endpoint_t endpt, iovec_t *iovec, unsigned int count, int flags);
static struct device *ahci_part(devminor_t minor);
static void ahci_alarm(clock_t stamp);
-static int ahci_ioctl(devminor_t minor, unsigned int request, endpoint_t endpt,
- cp_grant_id_t grant, endpoint_t user_endpt);
+static int ahci_ioctl(devminor_t minor, unsigned long request,
+ endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt);
static void ahci_intr(unsigned int mask);
static int ahci_device(devminor_t minor, device_id_t *id);
static struct port_state *ahci_get_port(devminor_t minor);
/*===========================================================================*
* ahci_ioctl *
*===========================================================================*/
-static int ahci_ioctl(devminor_t minor, unsigned int request, endpoint_t endpt,
- cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
+static int ahci_ioctl(devminor_t minor, unsigned long request,
+ endpoint_t endpt, cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
{
/* Process I/O control requests.
*/
static void w_need_reset(void);
static void ack_irqs(unsigned int);
static int w_do_close(devminor_t minor);
-static int w_ioctl(devminor_t minor, unsigned int request, endpoint_t endpt,
+static int w_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
cp_grant_id_t grant, endpoint_t user_endpt);
static void w_hw_int(unsigned int irqs);
static int com_simple(struct command *cmd);
/*===========================================================================*
* w_ioctl *
*===========================================================================*/
-static int w_ioctl(devminor_t minor, unsigned int request, endpoint_t endpt,
+static int w_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
{
int r, timeout, prev, count;
static int cat24c256_blk_close(devminor_t minor);
static ssize_t cat24c256_blk_transfer(devminor_t minor, int do_write,
u64_t pos, endpoint_t endpt, iovec_t * iov, unsigned int count, int flags);
-static int cat24c256_blk_ioctl(devminor_t minor, unsigned int request,
+static int cat24c256_blk_ioctl(devminor_t minor, unsigned long request,
endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt);
static struct device *cat24c256_blk_part(devminor_t minor);
static void cat24c256_blk_other(message * m, int ipc_status);
}
static int
-cat24c256_blk_ioctl(devminor_t minor, unsigned int request, endpoint_t endpt,
+cat24c256_blk_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
{
log_trace(&log, "cat24c256_blk_ioctl(%d)\n", minor);
static int fbd_close(devminor_t minor);
static int fbd_transfer(devminor_t minor, int do_write, u64_t position,
endpoint_t endpt, iovec_t *iov, unsigned int nr_req, int flags);
-static int fbd_ioctl(devminor_t minor, unsigned int request, endpoint_t endpt,
+static int fbd_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
cp_grant_id_t grant, endpoint_t user_endpt);
/* Variables. */
/*===========================================================================*
* fbd_ioctl *
*===========================================================================*/
-static int fbd_ioctl(devminor_t UNUSED(minor), unsigned int request,
+static int fbd_ioctl(devminor_t UNUSED(minor), unsigned long request,
endpoint_t endpt, cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
{
/* Handle an I/O control request. */
break;
default:
- printf("Filter: unknown ioctl request: %d!\n",
+ printf("Filter: unknown ioctl request: %ld!\n",
m->BDEV_REQUEST);
return ENOTTY;
}
endpoint_t endpt, iovec_t *iov, unsigned int nr_req, int flags);
static int m_block_open(devminor_t minor, int access);
static int m_block_close(devminor_t minor);
-static int m_block_ioctl(devminor_t minor, unsigned int request, endpoint_t
+static int m_block_ioctl(devminor_t minor, unsigned long request, endpoint_t
endpt, cp_grant_id_t grant, endpoint_t user_endpt);
/* Entry points to the CHARACTER part of this driver. */
/*===========================================================================*
* m_block_ioctl *
*===========================================================================*/
-static int m_block_ioctl(devminor_t minor, unsigned int request,
+static int m_block_ioctl(devminor_t minor, unsigned long request,
endpoint_t endpt, cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
{
/* I/O controls for the block devices of the memory driver. Currently there is
u64_t position,
endpoint_t endpt, iovec_t * iov, unsigned int nr_req, int flags);
-static int block_ioctl(devminor_t minor, unsigned int request,
+static int block_ioctl(devminor_t minor, unsigned long request,
endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt);
static struct device *block_part(devminor_t minor);
* block_ioctl *
*===========================================================================*/
static int
-block_ioctl(devminor_t minor, unsigned int request, endpoint_t endpt,
+block_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
{
/* IOCTL handling */
static int tda19988_blk_close(devminor_t minor);
static ssize_t tda19988_blk_transfer(devminor_t minor, int do_write, u64_t pos,
endpoint_t endpt, iovec_t * iov, unsigned int count, int flags);
-static int tda19988_blk_ioctl(devminor_t minor, unsigned int request,
+static int tda19988_blk_ioctl(devminor_t minor, unsigned long request,
endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt);
static struct device *tda19988_blk_part(devminor_t minor);
static void tda19988_blk_other(message * m, int ipc_status);
}
static int
-tda19988_blk_ioctl(devminor_t minor, unsigned int request, endpoint_t endpt,
+tda19988_blk_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
{
log_trace(&log, "tda19988_blk_ioctl(%d)\n", minor);
static ssize_t virtio_blk_transfer(devminor_t minor, int write, u64_t position,
endpoint_t endpt, iovec_t *iovec,
unsigned int cnt, int flags);
-static int virtio_blk_ioctl(devminor_t minor, unsigned int req,
+static int virtio_blk_ioctl(devminor_t minor, unsigned long req,
endpoint_t endpt, cp_grant_id_t grant, endpoint_t user_endpt);
static struct device * virtio_blk_part(devminor_t minor);
static void virtio_blk_geometry(devminor_t minor, struct part_geom *entry);
}
static int
-virtio_blk_ioctl(devminor_t minor, unsigned int req, endpoint_t endpt,
+virtio_blk_ioctl(devminor_t minor, unsigned long req, endpoint_t endpt,
cp_grant_id_t grant, endpoint_t UNUSED(user_endpt))
{
switch (req) {
int (*bdr_close)(devminor_t minor);
ssize_t (*bdr_transfer)(devminor_t minor, int do_write, u64_t pos,
endpoint_t endpt, iovec_t *iov, unsigned int count, int flags);
- int (*bdr_ioctl)(devminor_t minor, unsigned int request, endpoint_t endpt,
+ int (*bdr_ioctl)(devminor_t minor, unsigned long request, endpoint_t endpt,
cp_grant_id_t grant, endpoint_t user_endpt);
void (*bdr_cleanup)(void);
struct device *(*bdr_part)(devminor_t minor);
#define BDEV_MINOR m10_i1 /* minor device number */
#define BDEV_STATUS m10_i1 /* OK or error code */
#define BDEV_ACCESS m10_i2 /* access bits for open requests */
-#define BDEV_REQUEST m10_i2 /* I/O control request */
#define BDEV_COUNT m10_i2 /* number of bytes or elements in transfer */
#define BDEV_GRANT m10_i3 /* grant ID of buffer or vector */
#define BDEV_FLAGS m10_i4 /* transfer flags */
#define BDEV_USER m10_i4 /* user endpoint requesting I/O control */
#define BDEV_ID m10_l1 /* opaque request ID */
+#define BDEV_REQUEST m10_l2 /* I/O control request */
#define BDEV_POS_LO m10_l2 /* transfer position (low bits) */
#define BDEV_POS_HI m10_l3 /* transfer position (high bits) */
* Field names are prefixed with BDEV_. Separate field names are used for the
* "access", "request", and "user" fields.
*
- * m_type MINOR COUNT GRANT FLAGS ID POS_LO POS_HI
- * +--------------+--------+----------+-------+-------+------+------+------+
- * | BDEV_OPEN | minor | access | | | id | | |
- * |--------------+--------+----------+-------+-------+------+------+------|
- * | BDEV_CLOSE | minor | | | | id | | |
- * |--------------+--------+----------+-------+-------+------+------+------|
- * | BDEV_READ | minor | bytes | grant | flags | id | position |
- * |--------------+--------+----------+-------+-------+------+------+------|
- * | BDEV_WRITE | minor | bytes | grant | flags | id | position |
- * |--------------+--------+----------+-------+-------+------+------+------|
- * | BDEV_GATHER | minor | elements | grant | flags | id | position |
- * |--------------+--------+----------+-------+-------+------+------+------|
- * | BDEV_SCATTER | minor | elements | grant | flags | id | position |
- * |--------------+--------+----------+-------+-------+------+------+------|
- * | BDEV_IOCTL | minor | request | grant | user | id | | |
- * -------------------------------------------------------------------------
+ * m_type MINOR COUNT GRANT FLAGS ID POS_LO POS_HI
+ * +--------------+--------+----------+-------+-------+------+---------+------+
+ * | BDEV_OPEN | minor | access | | | id | | |
+ * |--------------+--------+----------+-------+-------+------+---------+------|
+ * | BDEV_CLOSE | minor | | | | id | | |
+ * |--------------+--------+----------+-------+-------+------+---------+------|
+ * | BDEV_READ | minor | bytes | grant | flags | id | position |
+ * |--------------+--------+----------+-------+-------+------+---------+------|
+ * | BDEV_WRITE | minor | bytes | grant | flags | id | position |
+ * |--------------+--------+----------+-------+-------+------+---------+------|
+ * | BDEV_GATHER | minor | elements | grant | flags | id | position |
+ * |--------------+--------+----------+-------+-------+------+---------+------|
+ * | BDEV_SCATTER | minor | elements | grant | flags | id | position |
+ * |--------------+--------+----------+-------+-------+------+---------+------|
+ * | BDEV_IOCTL | minor | | grant | user | id | request | |
+ * ----------------------------------------------------------------------------
*
* The following reply message is used for all requests.
*
* m_type STATUS ID
- * +--------------+--------+----------+-------+-------+------+------+------+
- * | BDEV_REPLY | status | | | | id | | |
- * -------------------------------------------------------------------------
+ * +--------------+--------+----------+-------+-------+------+---------+------+
+ * | BDEV_REPLY | status | | | | id | | |
+ * ----------------------------------------------------------------------------
*
* Changes:
* Oct 16, 2011 split character and block protocol (D.C. van Moolenbroek)
* do_dioctl *
*===========================================================================*/
static int do_dioctl(struct blockdriver *bdp, dev_t minor,
- unsigned int request, endpoint_t endpt, cp_grant_id_t grant)
+ unsigned long request, endpoint_t endpt, cp_grant_id_t grant)
{
/* Carry out a disk-specific I/O control request. */
struct device *dv;
* has specified that it is a disk driver.
*/
dev_t minor;
- unsigned int request;
+ unsigned long request;
cp_grant_id_t grant;
endpoint_t user_endpt;
int r;
/*===========================================================================*
* trace_ctl *
*===========================================================================*/
-int trace_ctl(dev_t minor, unsigned int request, endpoint_t endpt,
+int trace_ctl(dev_t minor, unsigned long request, endpoint_t endpt,
cp_grant_id_t grant)
{
/* Process a block trace control request.
switch (m_ptr->m_type) {
case BDEV_OPEN:
case BDEV_CLOSE:
- pos = ((u64_t)(0));
+ pos = 0;
size = m_ptr->BDEV_ACCESS;
flags = 0;
break;
case BDEV_IOCTL:
- pos = ((u64_t)(0));
+ pos = 0;
size = m_ptr->BDEV_REQUEST;
flags = 0;
#ifndef _BLOCKDRIVER_TRACE_H
#define _BLOCKDRIVER_TRACE_H
-int trace_ctl(dev_t minor, unsigned int request, endpoint_t endpt,
+int trace_ctl(dev_t minor, unsigned long request, endpoint_t endpt,
cp_grant_id_t grant);
void trace_start(thread_id_t thread_id, message *m_ptr);