Commit 14ca3b78 authored by James Bottomley's avatar James Bottomley

make Scsi_Cmnd and Scsi_Request.request be a pointer to the

block layer request instead of a copy.

Precursor to generic tag queueing work
parent 68587662
...@@ -1635,14 +1635,14 @@ static int aha1542_old_abort(Scsi_Cmnd * SCpnt) ...@@ -1635,14 +1635,14 @@ static int aha1542_old_abort(Scsi_Cmnd * SCpnt)
if (HOSTDATA(SCpnt->host)->SCint[i]) { if (HOSTDATA(SCpnt->host)->SCint[i]) {
if (HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) { if (HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) {
printk(KERN_ERR "Timed out command pending for %s\n", printk(KERN_ERR "Timed out command pending for %s\n",
kdevname(SCpnt->request.rq_dev)); kdevname(SCpnt->request->rq_dev));
if (HOSTDATA(SCpnt->host)->mb[i].status) { if (HOSTDATA(SCpnt->host)->mb[i].status) {
printk(KERN_ERR "OGMB still full - restarting\n"); printk(KERN_ERR "OGMB still full - restarting\n");
aha1542_out(SCpnt->host->io_port, &ahacmd, 1); aha1542_out(SCpnt->host->io_port, &ahacmd, 1);
}; };
} else } else
printk(KERN_ERR "Other pending command %s\n", printk(KERN_ERR "Other pending command %s\n",
kdevname(SCpnt->request.rq_dev)); kdevname(SCpnt->request->rq_dev));
} }
#endif #endif
......
...@@ -807,13 +807,13 @@ void print_sense_internal(const char * devclass, ...@@ -807,13 +807,13 @@ void print_sense_internal(const char * devclass,
void print_sense(const char * devclass, Scsi_Cmnd * SCpnt) void print_sense(const char * devclass, Scsi_Cmnd * SCpnt)
{ {
print_sense_internal(devclass, SCpnt->sense_buffer, print_sense_internal(devclass, SCpnt->sense_buffer,
SCpnt->request.rq_dev); SCpnt->request->rq_dev);
} }
void print_req_sense(const char * devclass, Scsi_Request * SRpnt) void print_req_sense(const char * devclass, Scsi_Request * SRpnt)
{ {
print_sense_internal(devclass, SRpnt->sr_sense_buffer, print_sense_internal(devclass, SRpnt->sr_sense_buffer,
SRpnt->sr_request.rq_dev); SRpnt->sr_request->rq_dev);
} }
#if (CONSTANTS & CONST_MSG) #if (CONSTANTS & CONST_MSG)
......
...@@ -1563,7 +1563,7 @@ static inline int do_qcomm(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { ...@@ -1563,7 +1563,7 @@ static inline int do_qcomm(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
if (linked_comm && SCpnt->device->queue_depth > 2 if (linked_comm && SCpnt->device->queue_depth > 2
&& TLDEV(SCpnt->device->type)) { && TLDEV(SCpnt->device->type)) {
HD(j)->cp_stat[i] = READY; HD(j)->cp_stat[i] = READY;
flush_dev(SCpnt->device, SCpnt->request.sector, j, FALSE); flush_dev(SCpnt->device, SCpnt->request->sector, j, FALSE);
return 0; return 0;
} }
...@@ -1875,11 +1875,11 @@ static inline int reorder(unsigned int j, unsigned long cursec, ...@@ -1875,11 +1875,11 @@ static inline int reorder(unsigned int j, unsigned long cursec,
if (!cpp->din) input_only = FALSE; if (!cpp->din) input_only = FALSE;
if (SCpnt->request.sector < minsec) minsec = SCpnt->request.sector; if (SCpnt->request->sector < minsec) minsec = SCpnt->request->sector;
if (SCpnt->request.sector > maxsec) maxsec = SCpnt->request.sector; if (SCpnt->request->sector > maxsec) maxsec = SCpnt->request->sector;
sl[n] = SCpnt->request.sector; sl[n] = SCpnt->request->sector;
ioseek += SCpnt->request.nr_sectors; ioseek += SCpnt->request->nr_sectors;
if (!n) continue; if (!n) continue;
...@@ -1907,7 +1907,7 @@ static inline int reorder(unsigned int j, unsigned long cursec, ...@@ -1907,7 +1907,7 @@ static inline int reorder(unsigned int j, unsigned long cursec,
if (!input_only) for (n = 0; n < n_ready; n++) { if (!input_only) for (n = 0; n < n_ready; n++) {
k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt; k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt;
ll[n] = SCpnt->request.nr_sectors; pl[n] = SCpnt->pid; ll[n] = SCpnt->request->nr_sectors; pl[n] = SCpnt->pid;
if (!n) continue; if (!n) continue;
...@@ -1935,7 +1935,7 @@ static inline int reorder(unsigned int j, unsigned long cursec, ...@@ -1935,7 +1935,7 @@ static inline int reorder(unsigned int j, unsigned long cursec,
" cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
(ihdlr ? "ihdlr" : "qcomm"), SCpnt->channel, SCpnt->target, (ihdlr ? "ihdlr" : "qcomm"), SCpnt->channel, SCpnt->target,
SCpnt->lun, SCpnt->pid, k, flushcount, n_ready, SCpnt->lun, SCpnt->pid, k, flushcount, n_ready,
SCpnt->request.sector, SCpnt->request.nr_sectors, cursec, SCpnt->request->sector, SCpnt->request->nr_sectors, cursec,
YESNO(s), YESNO(r), YESNO(rev), YESNO(input_only), YESNO(s), YESNO(r), YESNO(rev), YESNO(input_only),
YESNO(overlap), cpp->din); YESNO(overlap), cpp->din);
} }
...@@ -2073,7 +2073,7 @@ static inline void ihdlr(int irq, unsigned int j) { ...@@ -2073,7 +2073,7 @@ static inline void ihdlr(int irq, unsigned int j) {
if (linked_comm && SCpnt->device->queue_depth > 2 if (linked_comm && SCpnt->device->queue_depth > 2
&& TLDEV(SCpnt->device->type)) && TLDEV(SCpnt->device->type))
flush_dev(SCpnt->device, SCpnt->request.sector, j, TRUE); flush_dev(SCpnt->device, SCpnt->request->sector, j, TRUE);
tstatus = status_byte(spp->target_status); tstatus = status_byte(spp->target_status);
......
...@@ -618,7 +618,7 @@ static inline int should_transform(struct ata_device *drive, Scsi_Cmnd *cmd) ...@@ -618,7 +618,7 @@ static inline int should_transform(struct ata_device *drive, Scsi_Cmnd *cmd)
struct Scsi_Host *host = drive->driver_data; struct Scsi_Host *host = drive->driver_data;
idescsi_scsi_t *scsi = idescsi_private(host); idescsi_scsi_t *scsi = idescsi_private(host);
if (major(cmd->request.rq_dev) == SCSI_GENERIC_MAJOR) if (major(cmd->request->rq_dev) == SCSI_GENERIC_MAJOR)
return test_bit(IDESCSI_SG_TRANSFORM, &scsi->transform); return test_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
return test_bit(IDESCSI_TRANSFORM, &scsi->transform); return test_bit(IDESCSI_TRANSFORM, &scsi->transform);
} }
......
...@@ -271,7 +271,7 @@ static int osst_chk_result(OS_Scsi_Tape * STp, Scsi_Request * SRpnt) ...@@ -271,7 +271,7 @@ static int osst_chk_result(OS_Scsi_Tape * STp, Scsi_Request * SRpnt)
/* Wakeup from interrupt */ /* Wakeup from interrupt */
static void osst_sleep_done (Scsi_Cmnd * SCpnt) static void osst_sleep_done (Scsi_Cmnd * SCpnt)
{ {
unsigned int dev = TAPE_NR(SCpnt->request.rq_dev); unsigned int dev = TAPE_NR(SCpnt->request->rq_dev);
OS_Scsi_Tape * STp; OS_Scsi_Tape * STp;
if (os_scsi_tapes && (STp = os_scsi_tapes[dev])) { if (os_scsi_tapes && (STp = os_scsi_tapes[dev])) {
...@@ -286,13 +286,13 @@ static void osst_sleep_done (Scsi_Cmnd * SCpnt) ...@@ -286,13 +286,13 @@ static void osst_sleep_done (Scsi_Cmnd * SCpnt)
} }
else else
(STp->buffer)->midlevel_result = SCpnt->result; (STp->buffer)->midlevel_result = SCpnt->result;
SCpnt->request.rq_status = RQ_SCSI_DONE; SCpnt->request->rq_status = RQ_SCSI_DONE;
(STp->buffer)->last_SRpnt = SCpnt->sc_request; (STp->buffer)->last_SRpnt = SCpnt->sc_request;
#if DEBUG #if DEBUG
STp->write_pending = 0; STp->write_pending = 0;
#endif #endif
complete(SCpnt->request.waiting); complete(SCpnt->request->waiting);
} }
#if DEBUG #if DEBUG
else if (debugging) else if (debugging)
...@@ -314,7 +314,7 @@ static Scsi_Request * osst_do_scsi(Scsi_Request *SRpnt, OS_Scsi_Tape *STp, ...@@ -314,7 +314,7 @@ static Scsi_Request * osst_do_scsi(Scsi_Request *SRpnt, OS_Scsi_Tape *STp,
#endif #endif
if (SRpnt == NULL) { if (SRpnt == NULL) {
if ((SRpnt = scsi_allocate_request(STp->device)) == NULL) { if ((SRpnt = scsi_allocate_request(STp->device)) == NULL) {
printk(KERN_ERR "osst%d:E: Can't get SCSI request.\n", TAPE_NR(STp->devt)); printk(KERN_ERR "osst%d:E: Can't get SCSI request->\n", TAPE_NR(STp->devt));
if (signal_pending(current)) if (signal_pending(current))
(STp->buffer)->syscall_result = (-EINTR); (STp->buffer)->syscall_result = (-EINTR);
else else
...@@ -337,15 +337,15 @@ static Scsi_Request * osst_do_scsi(Scsi_Request *SRpnt, OS_Scsi_Tape *STp, ...@@ -337,15 +337,15 @@ static Scsi_Request * osst_do_scsi(Scsi_Request *SRpnt, OS_Scsi_Tape *STp,
bp = (STp->buffer)->b_data; bp = (STp->buffer)->b_data;
SRpnt->sr_data_direction = direction; SRpnt->sr_data_direction = direction;
SRpnt->sr_cmd_len = 0; SRpnt->sr_cmd_len = 0;
SRpnt->sr_request.waiting = &(STp->wait); SRpnt->sr_request->waiting = &(STp->wait);
SRpnt->sr_request.rq_status = RQ_SCSI_BUSY; SRpnt->sr_request->rq_status = RQ_SCSI_BUSY;
SRpnt->sr_request.rq_dev = STp->devt; SRpnt->sr_request->rq_dev = STp->devt;
scsi_do_req(SRpnt, (void *)cmd, bp, bytes, osst_sleep_done, timeout, retries); scsi_do_req(SRpnt, (void *)cmd, bp, bytes, osst_sleep_done, timeout, retries);
if (do_wait) { if (do_wait) {
wait_for_completion(SRpnt->sr_request.waiting); wait_for_completion(SRpnt->sr_request->waiting);
SRpnt->sr_request.waiting = NULL; SRpnt->sr_request->waiting = NULL;
STp->buffer->syscall_result = osst_chk_result(STp, SRpnt); STp->buffer->syscall_result = osst_chk_result(STp, SRpnt);
#ifdef OSST_INJECT_ERRORS #ifdef OSST_INJECT_ERRORS
if (STp->buffer->syscall_result == 0 && if (STp->buffer->syscall_result == 0 &&
...@@ -378,7 +378,7 @@ static void osst_write_behind_check(OS_Scsi_Tape *STp) ...@@ -378,7 +378,7 @@ static void osst_write_behind_check(OS_Scsi_Tape *STp)
STp->nbr_finished++; STp->nbr_finished++;
#endif #endif
wait_for_completion(&(STp->wait)); wait_for_completion(&(STp->wait));
(STp->buffer)->last_SRpnt->sr_request.waiting = NULL; (STp->buffer)->last_SRpnt->sr_request->waiting = NULL;
STp->buffer->syscall_result = osst_chk_result(STp, STp->buffer->last_SRpnt); STp->buffer->syscall_result = osst_chk_result(STp, STp->buffer->last_SRpnt);
......
...@@ -4236,7 +4236,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, srb_t * sp) ...@@ -4236,7 +4236,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, srb_t * sp)
/* Set transfer direction (READ and WRITE) */ /* Set transfer direction (READ and WRITE) */
/* Linux doesn't tell us */ /* Linux doesn't tell us */
/* /*
* For block devices, cmd->request.cmd has the operation * For block devices, cmd->request->cmd has the operation
* For character devices, this isn't always set properly, so * For character devices, this isn't always set properly, so
* we need to check data_cmnd[0]. This catches the conditions * we need to check data_cmnd[0]. This catches the conditions
* for st.c, but not sg. Generic commands are pass down to us. * for st.c, but not sg. Generic commands are pass down to us.
...@@ -6241,7 +6241,7 @@ qla1280_print_scsi_cmd(Scsi_Cmnd * cmd) ...@@ -6241,7 +6241,7 @@ qla1280_print_scsi_cmd(Scsi_Cmnd * cmd)
cmd->tag, cmd->flags, cmd->transfersize); cmd->tag, cmd->flags, cmd->transfersize);
printk(" Pid=%li, SP=0x%p\n", cmd->pid, CMD_SP(cmd)); printk(" Pid=%li, SP=0x%p\n", cmd->pid, CMD_SP(cmd));
printk(" underflow size = 0x%x, direction=0x%x, req.cmd=0x%x \n", printk(" underflow size = 0x%x, direction=0x%x, req.cmd=0x%x \n",
cmd->underflow, sp->dir, cmd->request.cmd); cmd->underflow, sp->dir, cmd->request->cmd);
} }
/************************************************************************** /**************************************************************************
......
...@@ -256,7 +256,7 @@ static void scsi_wait_done(Scsi_Cmnd * SCpnt) ...@@ -256,7 +256,7 @@ static void scsi_wait_done(Scsi_Cmnd * SCpnt)
{ {
struct request *req; struct request *req;
req = &SCpnt->request; req = SCpnt->request;
req->rq_status = RQ_SCSI_DONE; /* Busy, but indicate request done */ req->rq_status = RQ_SCSI_DONE; /* Busy, but indicate request done */
if (req->waiting) if (req->waiting)
...@@ -297,17 +297,19 @@ static spinlock_t scsi_bhqueue_lock = SPIN_LOCK_UNLOCKED; ...@@ -297,17 +297,19 @@ static spinlock_t scsi_bhqueue_lock = SPIN_LOCK_UNLOCKED;
Scsi_Request *scsi_allocate_request(Scsi_Device * device) Scsi_Request *scsi_allocate_request(Scsi_Device * device)
{ {
Scsi_Request *SRpnt = NULL; Scsi_Request *SRpnt = NULL;
const int offset = ALIGN(sizeof(Scsi_Request), 4);
const int size = offset + sizeof(struct request);
if (!device) if (!device)
panic("No device passed to scsi_allocate_request().\n"); panic("No device passed to scsi_allocate_request().\n");
SRpnt = (Scsi_Request *) kmalloc(sizeof(Scsi_Request), GFP_ATOMIC); SRpnt = (Scsi_Request *) kmalloc(size, GFP_ATOMIC);
if( SRpnt == NULL ) if( SRpnt == NULL )
{ {
return NULL; return NULL;
} }
memset(SRpnt, 0, size);
memset(SRpnt, 0, sizeof(Scsi_Request)); SRpnt->sr_request = (struct request *)(((char *)SRpnt) + offset);
SRpnt->sr_device = device; SRpnt->sr_device = device;
SRpnt->sr_host = device->host; SRpnt->sr_host = device->host;
SRpnt->sr_magic = SCSI_REQ_MAGIC; SRpnt->sr_magic = SCSI_REQ_MAGIC;
...@@ -435,7 +437,7 @@ Scsi_Cmnd *scsi_allocate_device(Scsi_Device * device, int wait, ...@@ -435,7 +437,7 @@ Scsi_Cmnd *scsi_allocate_device(Scsi_Device * device, int wait,
* Now we can check for a free command block for this device. * Now we can check for a free command block for this device.
*/ */
for (SCpnt = device->device_queue; SCpnt; SCpnt = SCpnt->next) { for (SCpnt = device->device_queue; SCpnt; SCpnt = SCpnt->next) {
if (SCpnt->request.rq_status == RQ_INACTIVE) if (SCpnt->request == NULL)
break; break;
} }
} }
...@@ -504,9 +506,7 @@ Scsi_Cmnd *scsi_allocate_device(Scsi_Device * device, int wait, ...@@ -504,9 +506,7 @@ Scsi_Cmnd *scsi_allocate_device(Scsi_Device * device, int wait,
} }
} }
SCpnt->request.rq_status = RQ_SCSI_BUSY; SCpnt->request = NULL;
SCpnt->request.waiting = NULL; /* And no one is waiting for this
* to complete */
atomic_inc(&SCpnt->host->host_active); atomic_inc(&SCpnt->host->host_active);
atomic_inc(&SCpnt->device->device_active); atomic_inc(&SCpnt->device->device_active);
...@@ -549,7 +549,7 @@ inline void __scsi_release_command(Scsi_Cmnd * SCpnt) ...@@ -549,7 +549,7 @@ inline void __scsi_release_command(Scsi_Cmnd * SCpnt)
SDpnt = SCpnt->device; SDpnt = SCpnt->device;
SCpnt->request.rq_status = RQ_INACTIVE; SCpnt->request = NULL;
SCpnt->state = SCSI_STATE_UNUSED; SCpnt->state = SCSI_STATE_UNUSED;
SCpnt->owner = SCSI_OWNER_NOBODY; SCpnt->owner = SCSI_OWNER_NOBODY;
atomic_dec(&SCpnt->host->host_active); atomic_dec(&SCpnt->host->host_active);
...@@ -772,13 +772,13 @@ void scsi_wait_req (Scsi_Request * SRpnt, const void *cmnd , ...@@ -772,13 +772,13 @@ void scsi_wait_req (Scsi_Request * SRpnt, const void *cmnd ,
DECLARE_COMPLETION(wait); DECLARE_COMPLETION(wait);
request_queue_t *q = &SRpnt->sr_device->request_queue; request_queue_t *q = &SRpnt->sr_device->request_queue;
SRpnt->sr_request.waiting = &wait; SRpnt->sr_request->waiting = &wait;
SRpnt->sr_request.rq_status = RQ_SCSI_BUSY; SRpnt->sr_request->rq_status = RQ_SCSI_BUSY;
scsi_do_req (SRpnt, (void *) cmnd, scsi_do_req (SRpnt, (void *) cmnd,
buffer, bufflen, scsi_wait_done, timeout, retries); buffer, bufflen, scsi_wait_done, timeout, retries);
generic_unplug_device(q); generic_unplug_device(q);
wait_for_completion(&wait); wait_for_completion(&wait);
SRpnt->sr_request.waiting = NULL; SRpnt->sr_request->waiting = NULL;
if( SRpnt->sr_command != NULL ) if( SRpnt->sr_command != NULL )
{ {
scsi_release_command(SRpnt->sr_command); scsi_release_command(SRpnt->sr_command);
...@@ -929,8 +929,7 @@ void scsi_init_cmd_from_req(Scsi_Cmnd * SCpnt, Scsi_Request * SRpnt) ...@@ -929,8 +929,7 @@ void scsi_init_cmd_from_req(Scsi_Cmnd * SCpnt, Scsi_Request * SRpnt)
SCpnt->cmd_len = SRpnt->sr_cmd_len; SCpnt->cmd_len = SRpnt->sr_cmd_len;
SCpnt->use_sg = SRpnt->sr_use_sg; SCpnt->use_sg = SRpnt->sr_use_sg;
memcpy((void *) &SCpnt->request, (const void *) &SRpnt->sr_request, SCpnt->request = SRpnt->sr_request;
sizeof(SRpnt->sr_request));
memcpy((void *) SCpnt->data_cmnd, (const void *) SRpnt->sr_cmnd, memcpy((void *) SCpnt->data_cmnd, (const void *) SRpnt->sr_cmnd,
sizeof(SCpnt->data_cmnd)); sizeof(SCpnt->data_cmnd));
SCpnt->reset_chain = NULL; SCpnt->reset_chain = NULL;
...@@ -1488,7 +1487,7 @@ void scsi_build_commandblocks(Scsi_Device * SDpnt) ...@@ -1488,7 +1487,7 @@ void scsi_build_commandblocks(Scsi_Device * SDpnt)
SCpnt->target = SDpnt->id; SCpnt->target = SDpnt->id;
SCpnt->lun = SDpnt->lun; SCpnt->lun = SDpnt->lun;
SCpnt->channel = SDpnt->channel; SCpnt->channel = SDpnt->channel;
SCpnt->request.rq_status = RQ_INACTIVE; SCpnt->request = NULL;
SCpnt->use_sg = 0; SCpnt->use_sg = 0;
SCpnt->old_use_sg = 0; SCpnt->old_use_sg = 0;
SCpnt->old_cmd_len = 0; SCpnt->old_cmd_len = 0;
...@@ -2060,16 +2059,16 @@ int scsi_unregister_host(Scsi_Host_Template * tpnt) ...@@ -2060,16 +2059,16 @@ int scsi_unregister_host(Scsi_Host_Template * tpnt)
SCpnt = SCpnt->next) { SCpnt = SCpnt->next) {
online_status = SDpnt->online; online_status = SDpnt->online;
SDpnt->online = FALSE; SDpnt->online = FALSE;
if (SCpnt->request.rq_status != RQ_INACTIVE) { if (SCpnt->request && SCpnt->request->rq_status != RQ_INACTIVE) {
printk(KERN_ERR "SCSI device not inactive - rq_status=%d, target=%d, pid=%ld, state=%d, owner=%d.\n", printk(KERN_ERR "SCSI device not inactive - rq_status=%d, target=%d, pid=%ld, state=%d, owner=%d.\n",
SCpnt->request.rq_status, SCpnt->target, SCpnt->pid, SCpnt->request->rq_status, SCpnt->target, SCpnt->pid,
SCpnt->state, SCpnt->owner); SCpnt->state, SCpnt->owner);
for (SDpnt1 = shpnt->host_queue; SDpnt1; for (SDpnt1 = shpnt->host_queue; SDpnt1;
SDpnt1 = SDpnt1->next) { SDpnt1 = SDpnt1->next) {
for (SCpnt = SDpnt1->device_queue; SCpnt; for (SCpnt = SDpnt1->device_queue; SCpnt;
SCpnt = SCpnt->next) SCpnt = SCpnt->next)
if (SCpnt->request.rq_status == RQ_SCSI_DISCONNECTING) if (SCpnt->request->rq_status == RQ_SCSI_DISCONNECTING)
SCpnt->request.rq_status = RQ_INACTIVE; SCpnt->request->rq_status = RQ_INACTIVE;
} }
SDpnt->online = online_status; SDpnt->online = online_status;
printk(KERN_ERR "Device busy???\n"); printk(KERN_ERR "Device busy???\n");
...@@ -2080,7 +2079,8 @@ int scsi_unregister_host(Scsi_Host_Template * tpnt) ...@@ -2080,7 +2079,8 @@ int scsi_unregister_host(Scsi_Host_Template * tpnt)
* continue on. * continue on.
*/ */
SCpnt->state = SCSI_STATE_DISCONNECTING; SCpnt->state = SCSI_STATE_DISCONNECTING;
SCpnt->request.rq_status = RQ_SCSI_DISCONNECTING; /* Mark as busy */ if(SCpnt->request)
SCpnt->request->rq_status = RQ_SCSI_DISCONNECTING; /* Mark as busy */
} }
} }
} }
...@@ -2390,11 +2390,11 @@ static void scsi_dump_status(int level) ...@@ -2390,11 +2390,11 @@ static void scsi_dump_status(int level)
SCpnt->target, SCpnt->target,
SCpnt->lun, SCpnt->lun,
kdevname(SCpnt->request.rq_dev), kdevname(SCpnt->request->rq_dev),
SCpnt->request.sector, SCpnt->request->sector,
SCpnt->request.nr_sectors, SCpnt->request->nr_sectors,
(long)SCpnt->request.current_nr_sectors, (long)SCpnt->request->current_nr_sectors,
SCpnt->request.rq_status, SCpnt->request->rq_status,
SCpnt->use_sg, SCpnt->use_sg,
SCpnt->retries, SCpnt->retries,
...@@ -2711,16 +2711,18 @@ int ...@@ -2711,16 +2711,18 @@ int
scsi_reset_provider(Scsi_Device *dev, int flag) scsi_reset_provider(Scsi_Device *dev, int flag)
{ {
Scsi_Cmnd SC, *SCpnt = &SC; Scsi_Cmnd SC, *SCpnt = &SC;
struct request req;
int rtn; int rtn;
SCpnt->request = &req;
memset(&SCpnt->eh_timeout, 0, sizeof(SCpnt->eh_timeout)); memset(&SCpnt->eh_timeout, 0, sizeof(SCpnt->eh_timeout));
SCpnt->host = dev->host; SCpnt->host = dev->host;
SCpnt->device = dev; SCpnt->device = dev;
SCpnt->target = dev->id; SCpnt->target = dev->id;
SCpnt->lun = dev->lun; SCpnt->lun = dev->lun;
SCpnt->channel = dev->channel; SCpnt->channel = dev->channel;
SCpnt->request.rq_status = RQ_SCSI_BUSY; SCpnt->request->rq_status = RQ_SCSI_BUSY;
SCpnt->request.waiting = NULL; SCpnt->request->waiting = NULL;
SCpnt->use_sg = 0; SCpnt->use_sg = 0;
SCpnt->old_use_sg = 0; SCpnt->old_use_sg = 0;
SCpnt->old_cmd_len = 0; SCpnt->old_cmd_len = 0;
......
...@@ -656,7 +656,7 @@ struct scsi_request { ...@@ -656,7 +656,7 @@ struct scsi_request {
struct Scsi_Host *sr_host; struct Scsi_Host *sr_host;
Scsi_Device *sr_device; Scsi_Device *sr_device;
Scsi_Cmnd *sr_command; Scsi_Cmnd *sr_command;
struct request sr_request; /* A copy of the command we are struct request *sr_request; /* A copy of the command we are
working on */ working on */
unsigned sr_bufflen; /* Size of data buffer */ unsigned sr_bufflen; /* Size of data buffer */
void *sr_buffer; /* Data buffer */ void *sr_buffer; /* Data buffer */
...@@ -767,7 +767,7 @@ struct scsi_cmnd { ...@@ -767,7 +767,7 @@ struct scsi_cmnd {
transferred less actual number transferred less actual number
transferred (0 if not supported) */ transferred (0 if not supported) */
struct request request; /* A copy of the command we are struct request *request; /* The command we are
working on */ working on */
unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; /* obtained by REQUEST SENSE unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; /* obtained by REQUEST SENSE
......
...@@ -694,7 +694,7 @@ static int scsi_debug_read(Scsi_Cmnd * SCpnt, int upper_blk, int block, ...@@ -694,7 +694,7 @@ static int scsi_debug_read(Scsi_Cmnd * SCpnt, int upper_blk, int block,
{ {
int delay = SCSI_SETUP_LATENCY; int delay = SCSI_SETUP_LATENCY;
delay += SCpnt->request.nr_sectors * SCSI_DATARATE; delay += SCpnt->request->nr_sectors * SCSI_DATARATE;
if (delay) if (delay)
usleep(delay); usleep(delay);
} }
......
...@@ -320,7 +320,7 @@ void scsi_eh_done(Scsi_Cmnd * SCpnt) ...@@ -320,7 +320,7 @@ void scsi_eh_done(Scsi_Cmnd * SCpnt)
return; return;
} }
SCpnt->request.rq_status = RQ_SCSI_DONE; SCpnt->request->rq_status = RQ_SCSI_DONE;
SCpnt->owner = SCSI_OWNER_ERROR_HANDLER; SCpnt->owner = SCSI_OWNER_ERROR_HANDLER;
SCpnt->eh_state = SUCCESS; SCpnt->eh_state = SUCCESS;
...@@ -347,7 +347,7 @@ void scsi_eh_done(Scsi_Cmnd * SCpnt) ...@@ -347,7 +347,7 @@ void scsi_eh_done(Scsi_Cmnd * SCpnt)
STATIC STATIC
void scsi_eh_action_done(Scsi_Cmnd * SCpnt, int answer) void scsi_eh_action_done(Scsi_Cmnd * SCpnt, int answer)
{ {
SCpnt->request.rq_status = RQ_SCSI_DONE; SCpnt->request->rq_status = RQ_SCSI_DONE;
SCpnt->owner = SCSI_OWNER_ERROR_HANDLER; SCpnt->owner = SCSI_OWNER_ERROR_HANDLER;
SCpnt->eh_state = (answer ? SUCCESS : FAILED); SCpnt->eh_state = (answer ? SUCCESS : FAILED);
...@@ -602,7 +602,7 @@ STATIC void scsi_send_eh_cmnd(Scsi_Cmnd * SCpnt, int timeout) ...@@ -602,7 +602,7 @@ STATIC void scsi_send_eh_cmnd(Scsi_Cmnd * SCpnt, int timeout)
* Set up the semaphore so we wait for the command to complete. * Set up the semaphore so we wait for the command to complete.
*/ */
SCpnt->host->eh_action = &sem; SCpnt->host->eh_action = &sem;
SCpnt->request.rq_status = RQ_SCSI_BUSY; SCpnt->request->rq_status = RQ_SCSI_BUSY;
spin_lock_irqsave(SCpnt->host->host_lock, flags); spin_lock_irqsave(SCpnt->host->host_lock, flags);
host->hostt->queuecommand(SCpnt, scsi_eh_done); host->hostt->queuecommand(SCpnt, scsi_eh_done);
...@@ -634,7 +634,7 @@ STATIC void scsi_send_eh_cmnd(Scsi_Cmnd * SCpnt, int timeout) ...@@ -634,7 +634,7 @@ STATIC void scsi_send_eh_cmnd(Scsi_Cmnd * SCpnt, int timeout)
SCpnt->host->hostt->eh_abort_handler(SCpnt); SCpnt->host->hostt->eh_abort_handler(SCpnt);
spin_unlock_irqrestore(SCpnt->host->host_lock, flags); spin_unlock_irqrestore(SCpnt->host->host_lock, flags);
SCpnt->request.rq_status = RQ_SCSI_DONE; SCpnt->request->rq_status = RQ_SCSI_DONE;
SCpnt->owner = SCSI_OWNER_ERROR_HANDLER; SCpnt->owner = SCSI_OWNER_ERROR_HANDLER;
SCpnt->eh_state = FAILED; SCpnt->eh_state = FAILED;
......
...@@ -79,9 +79,6 @@ static void __scsi_insert_special(request_queue_t *q, struct request *rq, ...@@ -79,9 +79,6 @@ static void __scsi_insert_special(request_queue_t *q, struct request *rq,
rq->flags = REQ_SPECIAL | REQ_BARRIER; rq->flags = REQ_SPECIAL | REQ_BARRIER;
rq->special = data; rq->special = data;
rq->q = NULL;
rq->bio = rq->biotail = NULL;
rq->nr_phys_segments = 0;
/* /*
* We have the option of inserting the head or the tail of the queue. * We have the option of inserting the head or the tail of the queue.
...@@ -120,7 +117,7 @@ int scsi_insert_special_cmd(Scsi_Cmnd * SCpnt, int at_head) ...@@ -120,7 +117,7 @@ int scsi_insert_special_cmd(Scsi_Cmnd * SCpnt, int at_head)
{ {
request_queue_t *q = &SCpnt->device->request_queue; request_queue_t *q = &SCpnt->device->request_queue;
__scsi_insert_special(q, &SCpnt->request, SCpnt, at_head); __scsi_insert_special(q, SCpnt->request, SCpnt, at_head);
return 0; return 0;
} }
...@@ -148,7 +145,7 @@ int scsi_insert_special_req(Scsi_Request * SRpnt, int at_head) ...@@ -148,7 +145,7 @@ int scsi_insert_special_req(Scsi_Request * SRpnt, int at_head)
{ {
request_queue_t *q = &SRpnt->sr_device->request_queue; request_queue_t *q = &SRpnt->sr_device->request_queue;
__scsi_insert_special(q, &SRpnt->sr_request, SRpnt, at_head); __scsi_insert_special(q, SRpnt->sr_request, SRpnt, at_head);
return 0; return 0;
} }
...@@ -259,8 +256,8 @@ void scsi_queue_next_request(request_queue_t * q, Scsi_Cmnd * SCpnt) ...@@ -259,8 +256,8 @@ void scsi_queue_next_request(request_queue_t * q, Scsi_Cmnd * SCpnt)
* in which case we need to request the blocks that come after * in which case we need to request the blocks that come after
* the bad sector. * the bad sector.
*/ */
SCpnt->request.special = (void *) SCpnt; SCpnt->request->special = (void *) SCpnt;
_elv_add_request(q, &SCpnt->request, 0, 0); _elv_add_request(q, SCpnt->request, 0, 0);
} }
/* /*
...@@ -356,15 +353,18 @@ static Scsi_Cmnd *__scsi_end_request(Scsi_Cmnd * SCpnt, ...@@ -356,15 +353,18 @@ static Scsi_Cmnd *__scsi_end_request(Scsi_Cmnd * SCpnt,
int frequeue) int frequeue)
{ {
request_queue_t *q = &SCpnt->device->request_queue; request_queue_t *q = &SCpnt->device->request_queue;
struct request *req = &SCpnt->request; struct request *req = SCpnt->request;
int flags;
ASSERT_LOCK(q->queue_lock, 0); ASSERT_LOCK(q->queue_lock, 0);
spin_lock_irqsave(q->queue_lock, flags);
/* /*
* If there are blocks left over at the end, set up the command * If there are blocks left over at the end, set up the command
* to queue the remainder of them. * to queue the remainder of them.
*/ */
if (end_that_request_first(req, uptodate, sectors)) { if (end_that_request_first(req, uptodate, sectors)) {
spin_unlock_irqrestore(q->queue_lock, flags);
if (!requeue) if (!requeue)
return SCpnt; return SCpnt;
...@@ -376,15 +376,12 @@ static Scsi_Cmnd *__scsi_end_request(Scsi_Cmnd * SCpnt, ...@@ -376,15 +376,12 @@ static Scsi_Cmnd *__scsi_end_request(Scsi_Cmnd * SCpnt,
return SCpnt; return SCpnt;
} }
/*
* This request is done. If there is someone blocked waiting for this
* request, wake them up.
*/
if (req->waiting)
complete(req->waiting);
add_blkdev_randomness(major(req->rq_dev)); add_blkdev_randomness(major(req->rq_dev));
end_that_request_last(req);
spin_unlock_irqrestore(q->queue_lock, flags);
/* /*
* This will goose the queue request function at the end, so we don't * This will goose the queue request function at the end, so we don't
* need to worry about launching another command. * need to worry about launching another command.
...@@ -441,7 +438,7 @@ Scsi_Cmnd *scsi_end_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors) ...@@ -441,7 +438,7 @@ Scsi_Cmnd *scsi_end_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors)
*/ */
static void scsi_release_buffers(Scsi_Cmnd * SCpnt) static void scsi_release_buffers(Scsi_Cmnd * SCpnt)
{ {
struct request *req = &SCpnt->request; struct request *req = SCpnt->request;
ASSERT_LOCK(SCpnt->host->host_lock, 0); ASSERT_LOCK(SCpnt->host->host_lock, 0);
...@@ -491,7 +488,7 @@ void scsi_io_completion(Scsi_Cmnd * SCpnt, int good_sectors, ...@@ -491,7 +488,7 @@ void scsi_io_completion(Scsi_Cmnd * SCpnt, int good_sectors,
int result = SCpnt->result; int result = SCpnt->result;
int this_count = SCpnt->bufflen >> 9; int this_count = SCpnt->bufflen >> 9;
request_queue_t *q = &SCpnt->device->request_queue; request_queue_t *q = &SCpnt->device->request_queue;
struct request *req = &SCpnt->request; struct request *req = SCpnt->request;
/* /*
* We must do one of several things here: * We must do one of several things here:
...@@ -675,7 +672,7 @@ void scsi_io_completion(Scsi_Cmnd * SCpnt, int good_sectors, ...@@ -675,7 +672,7 @@ void scsi_io_completion(Scsi_Cmnd * SCpnt, int good_sectors,
if (result) { if (result) {
struct Scsi_Device_Template *STpnt; struct Scsi_Device_Template *STpnt;
STpnt = scsi_get_request_dev(&SCpnt->request); STpnt = scsi_get_request_dev(SCpnt->request);
printk("SCSI %s error : host %d channel %d id %d lun %d return code = %x\n", printk("SCSI %s error : host %d channel %d id %d lun %d return code = %x\n",
(STpnt ? STpnt->name : "device"), (STpnt ? STpnt->name : "device"),
SCpnt->device->host->host_no, SCpnt->device->host->host_no,
...@@ -868,7 +865,7 @@ void scsi_request_fn(request_queue_t * q) ...@@ -868,7 +865,7 @@ void scsi_request_fn(request_queue_t * q)
* the remainder of a partially fulfilled request that can * the remainder of a partially fulfilled request that can
* come up when there is a medium error. We have to treat * come up when there is a medium error. We have to treat
* these two cases differently. We differentiate by looking * these two cases differently. We differentiate by looking
* at request.cmd, as this tells us the real story. * at request->cmd, as this tells us the real story.
*/ */
if (req->flags & REQ_SPECIAL) { if (req->flags & REQ_SPECIAL) {
STpnt = NULL; STpnt = NULL;
...@@ -904,6 +901,9 @@ void scsi_request_fn(request_queue_t * q) ...@@ -904,6 +901,9 @@ void scsi_request_fn(request_queue_t * q)
*/ */
if (!SCpnt) if (!SCpnt)
break; break;
/* pull a tag out of the request if we have one */
SCpnt->tag = req->tag;
} else { } else {
blk_dump_rq_flags(req, "SCSI bad req"); blk_dump_rq_flags(req, "SCSI bad req");
break; break;
...@@ -926,16 +926,8 @@ void scsi_request_fn(request_queue_t * q) ...@@ -926,16 +926,8 @@ void scsi_request_fn(request_queue_t * q)
*/ */
blkdev_dequeue_request(req); blkdev_dequeue_request(req);
if (req != &SCpnt->request && req != &SRpnt->sr_request ) { SCpnt->request = req;
memcpy(&SCpnt->request, req, sizeof(struct request));
/*
* We have copied the data out of the request block -
* it is now in a field in SCpnt. Release the request
* block.
*/
blkdev_release_request(req);
}
/* /*
* Now it is finally safe to release the lock. We are * Now it is finally safe to release the lock. We are
* not going to noodle the request list until this * not going to noodle the request list until this
...@@ -945,7 +937,7 @@ void scsi_request_fn(request_queue_t * q) ...@@ -945,7 +937,7 @@ void scsi_request_fn(request_queue_t * q)
req = NULL; req = NULL;
spin_unlock_irq(q->queue_lock); spin_unlock_irq(q->queue_lock);
if (SCpnt->request.flags & REQ_CMD) { if (SCpnt->request->flags & REQ_CMD) {
/* /*
* This will do a couple of things: * This will do a couple of things:
* 1) Fill in the actual SCSI command. * 1) Fill in the actual SCSI command.
...@@ -959,7 +951,7 @@ void scsi_request_fn(request_queue_t * q) ...@@ -959,7 +951,7 @@ void scsi_request_fn(request_queue_t * q)
* request to be rejected immediately. * request to be rejected immediately.
*/ */
if (STpnt == NULL) if (STpnt == NULL)
STpnt = scsi_get_request_dev(&SCpnt->request); STpnt = scsi_get_request_dev(SCpnt->request);
/* /*
* This sets up the scatter-gather table (allocating if * This sets up the scatter-gather table (allocating if
...@@ -973,9 +965,9 @@ void scsi_request_fn(request_queue_t * q) ...@@ -973,9 +965,9 @@ void scsi_request_fn(request_queue_t * q)
SDpnt->starved = 1; SDpnt->starved = 1;
SHpnt->some_device_starved = 1; SHpnt->some_device_starved = 1;
} }
SCpnt->request.special = SCpnt; SCpnt->request->special = SCpnt;
SCpnt->request.flags |= REQ_SPECIAL; SCpnt->request->flags |= REQ_SPECIAL;
_elv_add_request(q, &SCpnt->request, 0, 0); _elv_add_request(q, SCpnt->request, 0, 0);
break; break;
} }
...@@ -985,7 +977,7 @@ void scsi_request_fn(request_queue_t * q) ...@@ -985,7 +977,7 @@ void scsi_request_fn(request_queue_t * q)
if (!STpnt->init_command(SCpnt)) { if (!STpnt->init_command(SCpnt)) {
scsi_release_buffers(SCpnt); scsi_release_buffers(SCpnt);
SCpnt = __scsi_end_request(SCpnt, 0, SCpnt = __scsi_end_request(SCpnt, 0,
SCpnt->request.nr_sectors, 0, 0); SCpnt->request->nr_sectors, 0, 0);
if( SCpnt != NULL ) if( SCpnt != NULL )
{ {
panic("Should not have leftover blocks\n"); panic("Should not have leftover blocks\n");
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
*/ */
int scsi_init_io(Scsi_Cmnd *SCpnt) int scsi_init_io(Scsi_Cmnd *SCpnt)
{ {
struct request *req = &SCpnt->request; struct request *req = SCpnt->request;
struct scatterlist *sgpnt; struct scatterlist *sgpnt;
int count, gfp_mask; int count, gfp_mask;
......
...@@ -324,13 +324,13 @@ static int sd_init_command(Scsi_Cmnd * SCpnt) ...@@ -324,13 +324,13 @@ static int sd_init_command(Scsi_Cmnd * SCpnt)
/* /*
* don't support specials for nwo * don't support specials for nwo
*/ */
if (!(SCpnt->request.flags & REQ_CMD)) if (!(SCpnt->request->flags & REQ_CMD))
return 0; return 0;
part_nr = SD_PARTITION(SCpnt->request.rq_dev); part_nr = SD_PARTITION(SCpnt->request->rq_dev);
dsk_nr = DEVICE_NR(SCpnt->request.rq_dev); dsk_nr = DEVICE_NR(SCpnt->request->rq_dev);
block = SCpnt->request.sector; block = SCpnt->request->sector;
this_count = SCpnt->request_bufflen >> 9; this_count = SCpnt->request_bufflen >> 9;
SCSI_LOG_HLQUEUE(1, printk("sd_command_init: dsk_nr=%d, block=%d, " SCSI_LOG_HLQUEUE(1, printk("sd_command_init: dsk_nr=%d, block=%d, "
...@@ -341,9 +341,9 @@ static int sd_init_command(Scsi_Cmnd * SCpnt) ...@@ -341,9 +341,9 @@ static int sd_init_command(Scsi_Cmnd * SCpnt)
/* >>>>> this change is not in the lk 2.5 series */ /* >>>>> this change is not in the lk 2.5 series */
if (part_nr >= (sd_template.dev_max << 4) || (part_nr & 0xf) || if (part_nr >= (sd_template.dev_max << 4) || (part_nr & 0xf) ||
!sdp || !sdp->online || !sdp || !sdp->online ||
block + SCpnt->request.nr_sectors > sd[part_nr].nr_sects) { block + SCpnt->request->nr_sectors > sd[part_nr].nr_sects) {
SCSI_LOG_HLQUEUE(2, printk("Finishing %ld sectors\n", SCSI_LOG_HLQUEUE(2, printk("Finishing %ld sectors\n",
SCpnt->request.nr_sectors)); SCpnt->request->nr_sectors));
SCSI_LOG_HLQUEUE(2, printk("Retry with 0x%p\n", SCpnt)); SCSI_LOG_HLQUEUE(2, printk("Retry with 0x%p\n", SCpnt));
return 0; return 0;
} }
...@@ -372,7 +372,7 @@ static int sd_init_command(Scsi_Cmnd * SCpnt) ...@@ -372,7 +372,7 @@ static int sd_init_command(Scsi_Cmnd * SCpnt)
* for this. * for this.
*/ */
if (sdp->sector_size == 1024) { if (sdp->sector_size == 1024) {
if ((block & 1) || (SCpnt->request.nr_sectors & 1)) { if ((block & 1) || (SCpnt->request->nr_sectors & 1)) {
printk(KERN_ERR "sd: Bad block number requested"); printk(KERN_ERR "sd: Bad block number requested");
return 0; return 0;
} else { } else {
...@@ -381,7 +381,7 @@ static int sd_init_command(Scsi_Cmnd * SCpnt) ...@@ -381,7 +381,7 @@ static int sd_init_command(Scsi_Cmnd * SCpnt)
} }
} }
if (sdp->sector_size == 2048) { if (sdp->sector_size == 2048) {
if ((block & 3) || (SCpnt->request.nr_sectors & 3)) { if ((block & 3) || (SCpnt->request->nr_sectors & 3)) {
printk(KERN_ERR "sd: Bad block number requested"); printk(KERN_ERR "sd: Bad block number requested");
return 0; return 0;
} else { } else {
...@@ -390,7 +390,7 @@ static int sd_init_command(Scsi_Cmnd * SCpnt) ...@@ -390,7 +390,7 @@ static int sd_init_command(Scsi_Cmnd * SCpnt)
} }
} }
if (sdp->sector_size == 4096) { if (sdp->sector_size == 4096) {
if ((block & 7) || (SCpnt->request.nr_sectors & 7)) { if ((block & 7) || (SCpnt->request->nr_sectors & 7)) {
printk(KERN_ERR "sd: Bad block number requested"); printk(KERN_ERR "sd: Bad block number requested");
return 0; return 0;
} else { } else {
...@@ -398,25 +398,25 @@ static int sd_init_command(Scsi_Cmnd * SCpnt) ...@@ -398,25 +398,25 @@ static int sd_init_command(Scsi_Cmnd * SCpnt)
this_count = this_count >> 3; this_count = this_count >> 3;
} }
} }
if (rq_data_dir(&SCpnt->request) == WRITE) { if (rq_data_dir(SCpnt->request) == WRITE) {
if (!sdp->writeable) { if (!sdp->writeable) {
return 0; return 0;
} }
SCpnt->cmnd[0] = WRITE_6; SCpnt->cmnd[0] = WRITE_6;
SCpnt->sc_data_direction = SCSI_DATA_WRITE; SCpnt->sc_data_direction = SCSI_DATA_WRITE;
} else if (rq_data_dir(&SCpnt->request) == READ) { } else if (rq_data_dir(SCpnt->request) == READ) {
SCpnt->cmnd[0] = READ_6; SCpnt->cmnd[0] = READ_6;
SCpnt->sc_data_direction = SCSI_DATA_READ; SCpnt->sc_data_direction = SCSI_DATA_READ;
} else { } else {
printk(KERN_ERR "sd: Unknown command %lx\n", printk(KERN_ERR "sd: Unknown command %lx\n",
SCpnt->request.flags); SCpnt->request->flags);
/* overkill panic("Unknown sd command %lx\n", SCpnt->request.flags); */ /* overkill panic("Unknown sd command %lx\n", SCpnt->request->flags); */
return 0; return 0;
} }
SCSI_LOG_HLQUEUE(2, printk("%s : %s %d/%ld 512 byte blocks.\n", SCSI_LOG_HLQUEUE(2, printk("%s : %s %d/%ld 512 byte blocks.\n",
nbuff, (rq_data_dir(&SCpnt->request) == WRITE) ? nbuff, (rq_data_dir(SCpnt->request) == WRITE) ?
"writing" : "reading", this_count, SCpnt->request.nr_sectors)); "writing" : "reading", this_count, SCpnt->request->nr_sectors));
SCpnt->cmnd[1] = (SCpnt->device->scsi_level <= SCSI_2) ? SCpnt->cmnd[1] = (SCpnt->device->scsi_level <= SCSI_2) ?
((SCpnt->lun << 5) & 0xe0) : 0; ((SCpnt->lun << 5) & 0xe0) : 0;
...@@ -662,7 +662,7 @@ static void sd_rw_intr(Scsi_Cmnd * SCpnt) ...@@ -662,7 +662,7 @@ static void sd_rw_intr(Scsi_Cmnd * SCpnt)
#if CONFIG_SCSI_LOGGING #if CONFIG_SCSI_LOGGING
char nbuff[6]; char nbuff[6];
SCSI_LOG_HLCOMPLETE(1, sd_dskname(DEVICE_NR(SCpnt->request.rq_dev), SCSI_LOG_HLCOMPLETE(1, sd_dskname(DEVICE_NR(SCpnt->request->rq_dev),
nbuff)); nbuff));
SCSI_LOG_HLCOMPLETE(1, printk("sd_rw_intr: %s: res=0x%x\n", SCSI_LOG_HLCOMPLETE(1, printk("sd_rw_intr: %s: res=0x%x\n",
nbuff, result)); nbuff, result));
...@@ -688,8 +688,8 @@ static void sd_rw_intr(Scsi_Cmnd * SCpnt) ...@@ -688,8 +688,8 @@ static void sd_rw_intr(Scsi_Cmnd * SCpnt)
(SCpnt->sense_buffer[4] << 16) | (SCpnt->sense_buffer[4] << 16) |
(SCpnt->sense_buffer[5] << 8) | (SCpnt->sense_buffer[5] << 8) |
SCpnt->sense_buffer[6]; SCpnt->sense_buffer[6];
if (SCpnt->request.bio != NULL) if (SCpnt->request->bio != NULL)
block_sectors = bio_sectors(SCpnt->request.bio); block_sectors = bio_sectors(SCpnt->request->bio);
switch (SCpnt->device->sector_size) { switch (SCpnt->device->sector_size) {
case 1024: case 1024:
error_sector <<= 1; error_sector <<= 1;
...@@ -714,7 +714,7 @@ static void sd_rw_intr(Scsi_Cmnd * SCpnt) ...@@ -714,7 +714,7 @@ static void sd_rw_intr(Scsi_Cmnd * SCpnt)
} }
error_sector &= ~(block_sectors - 1); error_sector &= ~(block_sectors - 1);
good_sectors = error_sector - SCpnt->request.sector; good_sectors = error_sector - SCpnt->request->sector;
if (good_sectors < 0 || good_sectors >= this_count) if (good_sectors < 0 || good_sectors >= this_count)
good_sectors = 0; good_sectors = 0;
break; break;
......
...@@ -695,7 +695,7 @@ static int sg_common_write(Sg_fd * sfp, Sg_request * srp, ...@@ -695,7 +695,7 @@ static int sg_common_write(Sg_fd * sfp, Sg_request * srp,
srp->my_cmdp = SRpnt; srp->my_cmdp = SRpnt;
q = &SRpnt->sr_device->request_queue; q = &SRpnt->sr_device->request_queue;
SRpnt->sr_request.rq_dev = sdp->i_rdev; SRpnt->sr_request->rq_dev = sdp->i_rdev;
SRpnt->sr_sense_buffer[0] = 0; SRpnt->sr_sense_buffer[0] = 0;
SRpnt->sr_cmd_len = hp->cmd_len; SRpnt->sr_cmd_len = hp->cmd_len;
if (! (hp->flags & SG_FLAG_LUN_INHIBIT)) { if (! (hp->flags & SG_FLAG_LUN_INHIBIT)) {
...@@ -1222,7 +1222,7 @@ static void sg_cmd_done_bh(Scsi_Cmnd * SCpnt) ...@@ -1222,7 +1222,7 @@ static void sg_cmd_done_bh(Scsi_Cmnd * SCpnt)
SRpnt->sr_bufflen = 0; SRpnt->sr_bufflen = 0;
SRpnt->sr_buffer = NULL; SRpnt->sr_buffer = NULL;
SRpnt->sr_underflow = 0; SRpnt->sr_underflow = 0;
SRpnt->sr_request.rq_dev = mk_kdev(0, 0); /* "sg" _disowns_ request blk */ SRpnt->sr_request->rq_dev = mk_kdev(0, 0); /* "sg" _disowns_ request blk */
srp->my_cmdp = NULL; srp->my_cmdp = NULL;
srp->done = 1; srp->done = 1;
......
...@@ -196,11 +196,11 @@ static void rw_intr(Scsi_Cmnd * SCpnt) ...@@ -196,11 +196,11 @@ static void rw_intr(Scsi_Cmnd * SCpnt)
int this_count = SCpnt->bufflen >> 9; int this_count = SCpnt->bufflen >> 9;
int good_sectors = (result == 0 ? this_count : 0); int good_sectors = (result == 0 ? this_count : 0);
int block_sectors = 0; int block_sectors = 0;
int device_nr = DEVICE_NR(SCpnt->request.rq_dev); int device_nr = DEVICE_NR(SCpnt->request->rq_dev);
Scsi_CD *SCp = &scsi_CDs[device_nr]; Scsi_CD *SCp = &scsi_CDs[device_nr];
#ifdef DEBUG #ifdef DEBUG
printk("sr.c done: %x %p\n", result, SCpnt->request.bh->b_data); printk("sr.c done: %x %p\n", result, SCpnt->request->bh->b_data);
#endif #endif
/* /*
Handle MEDIUM ERRORs or VOLUME OVERFLOWs that indicate partial success. Handle MEDIUM ERRORs or VOLUME OVERFLOWs that indicate partial success.
...@@ -218,14 +218,14 @@ static void rw_intr(Scsi_Cmnd * SCpnt) ...@@ -218,14 +218,14 @@ static void rw_intr(Scsi_Cmnd * SCpnt)
(SCpnt->sense_buffer[4] << 16) | (SCpnt->sense_buffer[4] << 16) |
(SCpnt->sense_buffer[5] << 8) | (SCpnt->sense_buffer[5] << 8) |
SCpnt->sense_buffer[6]; SCpnt->sense_buffer[6];
if (SCpnt->request.bio != NULL) if (SCpnt->request->bio != NULL)
block_sectors = bio_sectors(SCpnt->request.bio); block_sectors = bio_sectors(SCpnt->request->bio);
if (block_sectors < 4) if (block_sectors < 4)
block_sectors = 4; block_sectors = 4;
if (SCp->device->sector_size == 2048) if (SCp->device->sector_size == 2048)
error_sector <<= 2; error_sector <<= 2;
error_sector &= ~(block_sectors - 1); error_sector &= ~(block_sectors - 1);
good_sectors = error_sector - SCpnt->request.sector; good_sectors = error_sector - SCpnt->request->sector;
if (good_sectors < 0 || good_sectors >= this_count) if (good_sectors < 0 || good_sectors >= this_count)
good_sectors = 0; good_sectors = 0;
/* /*
...@@ -265,14 +265,14 @@ static int sr_init_command(Scsi_Cmnd * SCpnt) ...@@ -265,14 +265,14 @@ static int sr_init_command(Scsi_Cmnd * SCpnt)
int dev, devm, block=0, this_count, s_size; int dev, devm, block=0, this_count, s_size;
Scsi_CD *SCp; Scsi_CD *SCp;
devm = minor(SCpnt->request.rq_dev); devm = minor(SCpnt->request->rq_dev);
dev = DEVICE_NR(SCpnt->request.rq_dev); dev = DEVICE_NR(SCpnt->request->rq_dev);
SCp = &scsi_CDs[dev]; SCp = &scsi_CDs[dev];
SCSI_LOG_HLQUEUE(1, printk("Doing sr request, dev = %d, block = %d\n", devm, block)); SCSI_LOG_HLQUEUE(1, printk("Doing sr request, dev = %d, block = %d\n", devm, block));
if (dev >= sr_template.nr_dev || !SCp->device || !SCp->device->online) { if (dev >= sr_template.nr_dev || !SCp->device || !SCp->device->online) {
SCSI_LOG_HLQUEUE(2, printk("Finishing %ld sectors\n", SCpnt->request.nr_sectors)); SCSI_LOG_HLQUEUE(2, printk("Finishing %ld sectors\n", SCpnt->request->nr_sectors));
SCSI_LOG_HLQUEUE(2, printk("Retry with 0x%p\n", SCpnt)); SCSI_LOG_HLQUEUE(2, printk("Retry with 0x%p\n", SCpnt));
return 0; return 0;
} }
...@@ -285,8 +285,8 @@ static int sr_init_command(Scsi_Cmnd * SCpnt) ...@@ -285,8 +285,8 @@ static int sr_init_command(Scsi_Cmnd * SCpnt)
return 0; return 0;
} }
if (!(SCpnt->request.flags & REQ_CMD)) { if (!(SCpnt->request->flags & REQ_CMD)) {
blk_dump_rq_flags(&SCpnt->request, "sr unsup command"); blk_dump_rq_flags(SCpnt->request, "sr unsup command");
return 0; return 0;
} }
...@@ -307,23 +307,23 @@ static int sr_init_command(Scsi_Cmnd * SCpnt) ...@@ -307,23 +307,23 @@ static int sr_init_command(Scsi_Cmnd * SCpnt)
return 0; return 0;
} }
if (rq_data_dir(&SCpnt->request) == WRITE) { if (rq_data_dir(SCpnt->request) == WRITE) {
if (!SCp->device->writeable) if (!SCp->device->writeable)
return 0; return 0;
SCpnt->cmnd[0] = WRITE_10; SCpnt->cmnd[0] = WRITE_10;
SCpnt->sc_data_direction = SCSI_DATA_WRITE; SCpnt->sc_data_direction = SCSI_DATA_WRITE;
} else if (rq_data_dir(&SCpnt->request) == READ) { } else if (rq_data_dir(SCpnt->request) == READ) {
SCpnt->cmnd[0] = READ_10; SCpnt->cmnd[0] = READ_10;
SCpnt->sc_data_direction = SCSI_DATA_READ; SCpnt->sc_data_direction = SCSI_DATA_READ;
} else { } else {
blk_dump_rq_flags(&SCpnt->request, "Unknown sr command"); blk_dump_rq_flags(SCpnt->request, "Unknown sr command");
return 0; return 0;
} }
/* /*
* request doesn't start on hw block boundary, add scatter pads * request doesn't start on hw block boundary, add scatter pads
*/ */
if ((SCpnt->request.sector % (s_size >> 9)) || (SCpnt->request_bufflen % s_size)) { if ((SCpnt->request->sector % (s_size >> 9)) || (SCpnt->request_bufflen % s_size)) {
printk("sr: unaligned transfer\n"); printk("sr: unaligned transfer\n");
return 0; return 0;
} }
...@@ -333,13 +333,13 @@ static int sr_init_command(Scsi_Cmnd * SCpnt) ...@@ -333,13 +333,13 @@ static int sr_init_command(Scsi_Cmnd * SCpnt)
SCSI_LOG_HLQUEUE(2, printk("sr%d : %s %d/%ld 512 byte blocks.\n", SCSI_LOG_HLQUEUE(2, printk("sr%d : %s %d/%ld 512 byte blocks.\n",
devm, devm,
(rq_data_dir(&SCpnt->request) == WRITE) ? "writing" : "reading", (rq_data_dir(SCpnt->request) == WRITE) ? "writing" : "reading",
this_count, SCpnt->request.nr_sectors)); this_count, SCpnt->request->nr_sectors));
SCpnt->cmnd[1] = (SCpnt->device->scsi_level <= SCSI_2) ? SCpnt->cmnd[1] = (SCpnt->device->scsi_level <= SCSI_2) ?
((SCpnt->lun << 5) & 0xe0) : 0; ((SCpnt->lun << 5) & 0xe0) : 0;
block = SCpnt->request.sector / (s_size >> 9); block = SCpnt->request->sector / (s_size >> 9);
if (this_count > 0xffff) if (this_count > 0xffff)
this_count = 0xffff; this_count = 0xffff;
...@@ -495,7 +495,7 @@ void get_sectorsize(int i) ...@@ -495,7 +495,7 @@ void get_sectorsize(int i)
cmd[1] = (SCp->device->scsi_level <= SCSI_2) ? cmd[1] = (SCp->device->scsi_level <= SCSI_2) ?
((SCp->device->lun << 5) & 0xe0) : 0; ((SCp->device->lun << 5) & 0xe0) : 0;
memset((void *) &cmd[2], 0, 8); memset((void *) &cmd[2], 0, 8);
SRpnt->sr_request.rq_status = RQ_SCSI_BUSY; /* Mark as really busy */ SRpnt->sr_request->rq_status = RQ_SCSI_BUSY; /* Mark as really busy */
SRpnt->sr_cmd_len = 0; SRpnt->sr_cmd_len = 0;
memset(buffer, 0, 8); memset(buffer, 0, 8);
......
...@@ -93,7 +93,7 @@ int sr_do_ioctl(int target, unsigned char *sr_cmd, void *buffer, unsigned buflen ...@@ -93,7 +93,7 @@ int sr_do_ioctl(int target, unsigned char *sr_cmd, void *buffer, unsigned buflen
SRpnt->sr_data_direction = readwrite; SRpnt->sr_data_direction = readwrite;
/* use ISA DMA buffer if necessary */ /* use ISA DMA buffer if necessary */
SRpnt->sr_request.buffer = buffer; SRpnt->sr_request->buffer = buffer;
if (buffer && SRpnt->sr_host->unchecked_isa_dma && if (buffer && SRpnt->sr_host->unchecked_isa_dma &&
(virt_to_phys(buffer) + buflength - 1 > ISA_DMA_THRESHOLD)) { (virt_to_phys(buffer) + buflength - 1 > ISA_DMA_THRESHOLD)) {
bounce_buffer = (char *) kmalloc(buflength, GFP_DMA); bounce_buffer = (char *) kmalloc(buflength, GFP_DMA);
...@@ -112,7 +112,7 @@ int sr_do_ioctl(int target, unsigned char *sr_cmd, void *buffer, unsigned buflen ...@@ -112,7 +112,7 @@ int sr_do_ioctl(int target, unsigned char *sr_cmd, void *buffer, unsigned buflen
scsi_wait_req(SRpnt, (void *) sr_cmd, (void *) buffer, buflength, scsi_wait_req(SRpnt, (void *) sr_cmd, (void *) buffer, buflength,
IOCTL_TIMEOUT, IOCTL_RETRIES); IOCTL_TIMEOUT, IOCTL_RETRIES);
req = &SRpnt->sr_request; req = SRpnt->sr_request;
if (SRpnt->sr_buffer && req->buffer && SRpnt->sr_buffer != req->buffer) { if (SRpnt->sr_buffer && req->buffer && SRpnt->sr_buffer != req->buffer) {
memcpy(req->buffer, SRpnt->sr_buffer, SRpnt->sr_bufflen); memcpy(req->buffer, SRpnt->sr_buffer, SRpnt->sr_bufflen);
kfree(SRpnt->sr_buffer); kfree(SRpnt->sr_buffer);
......
...@@ -239,7 +239,7 @@ static int st_chk_result(Scsi_Tape *STp, Scsi_Request * SRpnt) ...@@ -239,7 +239,7 @@ static int st_chk_result(Scsi_Tape *STp, Scsi_Request * SRpnt)
scode = 0; scode = 0;
} }
dev = TAPE_NR(SRpnt->sr_request.rq_dev); dev = TAPE_NR(SRpnt->sr_request->rq_dev);
DEB( DEB(
if (debugging) { if (debugging) {
printk(ST_DEB_MSG "st%d: Error: %x, cmd: %x %x %x %x %x %x Len: %d\n", printk(ST_DEB_MSG "st%d: Error: %x, cmd: %x %x %x %x %x %x Len: %d\n",
...@@ -316,7 +316,7 @@ static void st_sleep_done(Scsi_Cmnd * SCpnt) ...@@ -316,7 +316,7 @@ static void st_sleep_done(Scsi_Cmnd * SCpnt)
int remainder; int remainder;
Scsi_Tape *STp; Scsi_Tape *STp;
st_nbr = TAPE_NR(SCpnt->request.rq_dev); st_nbr = TAPE_NR(SCpnt->request->rq_dev);
read_lock(&st_dev_arr_lock); read_lock(&st_dev_arr_lock);
STp = scsi_tapes[st_nbr]; STp = scsi_tapes[st_nbr];
read_unlock(&st_dev_arr_lock); read_unlock(&st_dev_arr_lock);
...@@ -338,11 +338,11 @@ static void st_sleep_done(Scsi_Cmnd * SCpnt) ...@@ -338,11 +338,11 @@ static void st_sleep_done(Scsi_Cmnd * SCpnt)
(STp->buffer)->midlevel_result = INT_MAX; /* OK */ (STp->buffer)->midlevel_result = INT_MAX; /* OK */
} else } else
(STp->buffer)->midlevel_result = SCpnt->result; (STp->buffer)->midlevel_result = SCpnt->result;
SCpnt->request.rq_status = RQ_SCSI_DONE; SCpnt->request->rq_status = RQ_SCSI_DONE;
(STp->buffer)->last_SRpnt = SCpnt->sc_request; (STp->buffer)->last_SRpnt = SCpnt->sc_request;
DEB( STp->write_pending = 0; ) DEB( STp->write_pending = 0; )
complete(SCpnt->request.waiting); complete(SCpnt->request->waiting);
} }
...@@ -381,16 +381,16 @@ static Scsi_Request * ...@@ -381,16 +381,16 @@ static Scsi_Request *
bp = (STp->buffer)->b_data; bp = (STp->buffer)->b_data;
SRpnt->sr_data_direction = direction; SRpnt->sr_data_direction = direction;
SRpnt->sr_cmd_len = 0; SRpnt->sr_cmd_len = 0;
SRpnt->sr_request.waiting = &(STp->wait); SRpnt->sr_request->waiting = &(STp->wait);
SRpnt->sr_request.rq_status = RQ_SCSI_BUSY; SRpnt->sr_request->rq_status = RQ_SCSI_BUSY;
SRpnt->sr_request.rq_dev = STp->devt; SRpnt->sr_request->rq_dev = STp->devt;
scsi_do_req(SRpnt, (void *) cmd, bp, bytes, scsi_do_req(SRpnt, (void *) cmd, bp, bytes,
st_sleep_done, timeout, retries); st_sleep_done, timeout, retries);
if (do_wait) { if (do_wait) {
wait_for_completion(SRpnt->sr_request.waiting); wait_for_completion(SRpnt->sr_request->waiting);
SRpnt->sr_request.waiting = NULL; SRpnt->sr_request->waiting = NULL;
(STp->buffer)->syscall_result = st_chk_result(STp, SRpnt); (STp->buffer)->syscall_result = st_chk_result(STp, SRpnt);
} }
return SRpnt; return SRpnt;
...@@ -413,7 +413,7 @@ static void write_behind_check(Scsi_Tape * STp) ...@@ -413,7 +413,7 @@ static void write_behind_check(Scsi_Tape * STp)
) /* end DEB */ ) /* end DEB */
wait_for_completion(&(STp->wait)); wait_for_completion(&(STp->wait));
(STp->buffer)->last_SRpnt->sr_request.waiting = NULL; (STp->buffer)->last_SRpnt->sr_request->waiting = NULL;
(STp->buffer)->syscall_result = st_chk_result(STp, (STp->buffer)->last_SRpnt); (STp->buffer)->syscall_result = st_chk_result(STp, (STp->buffer)->last_SRpnt);
scsi_release_request((STp->buffer)->last_SRpnt); scsi_release_request((STp->buffer)->last_SRpnt);
......
...@@ -1217,7 +1217,7 @@ static void NCR5380_dma_complete( struct Scsi_Host *instance ) ...@@ -1217,7 +1217,7 @@ static void NCR5380_dma_complete( struct Scsi_Host *instance )
HOSTNO, NCR5380_read(BUS_AND_STATUS_REG), HOSTNO, NCR5380_read(BUS_AND_STATUS_REG),
NCR5380_read(STATUS_REG)); NCR5380_read(STATUS_REG));
if((sun3scsi_dma_finish(hostdata->connected->request.cmd))) { if((sun3scsi_dma_finish(hostdata->connected->request->cmd))) {
printk("scsi%d: overrun in UDC counter -- not prepared to deal with this!\n", HOSTNO); printk("scsi%d: overrun in UDC counter -- not prepared to deal with this!\n", HOSTNO);
printk("please e-mail sammy@oh.verio.com with a description of how this\n"); printk("please e-mail sammy@oh.verio.com with a description of how this\n");
printk("error was produced.\n"); printk("error was produced.\n");
...@@ -2016,9 +2016,9 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance) ...@@ -2016,9 +2016,9 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
if((count > SUN3_DMA_MINSIZE) && (sun3_dma_setup_done if((count > SUN3_DMA_MINSIZE) && (sun3_dma_setup_done
!= cmd)) != cmd))
{ {
if((cmd->request.cmd == 0) || (cmd->request.cmd == 1)) { if((cmd->request->cmd == 0) || (cmd->request->cmd == 1)) {
sun3scsi_dma_setup(d, count, sun3scsi_dma_setup(d, count,
cmd->request.cmd); cmd->request->cmd);
sun3_dma_setup_done = cmd; sun3_dma_setup_done = cmd;
} }
} }
...@@ -2628,7 +2628,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance) ...@@ -2628,7 +2628,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
!= tmp)) != tmp))
{ {
sun3scsi_dma_setup(d, count, sun3scsi_dma_setup(d, count,
tmp->request.cmd); tmp->request->cmd);
sun3_dma_setup_done = tmp; sun3_dma_setup_done = tmp;
} }
#endif #endif
......
...@@ -519,7 +519,7 @@ static inline unsigned long sun3scsi_dma_residual(struct Scsi_Host *instance) ...@@ -519,7 +519,7 @@ static inline unsigned long sun3scsi_dma_residual(struct Scsi_Host *instance)
static inline unsigned long sun3scsi_dma_xfer_len(unsigned long wanted, Scsi_Cmnd *cmd, static inline unsigned long sun3scsi_dma_xfer_len(unsigned long wanted, Scsi_Cmnd *cmd,
int write_flag) int write_flag)
{ {
if((cmd->request.cmd == 0) || (cmd->request.cmd == 1)) if((cmd->request->cmd == 0) || (cmd->request->cmd == 1))
return wanted; return wanted;
else else
return 0; return 0;
......
...@@ -1206,7 +1206,7 @@ static inline int do_qcomm(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) { ...@@ -1206,7 +1206,7 @@ static inline int do_qcomm(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
if (linked_comm && SCpnt->device->queue_depth > 2 if (linked_comm && SCpnt->device->queue_depth > 2
&& TLDEV(SCpnt->device->type)) { && TLDEV(SCpnt->device->type)) {
HD(j)->cp_stat[i] = READY; HD(j)->cp_stat[i] = READY;
flush_dev(SCpnt->device, SCpnt->request.sector, j, FALSE); flush_dev(SCpnt->device, SCpnt->request->sector, j, FALSE);
return 0; return 0;
} }
...@@ -1529,11 +1529,11 @@ static inline int reorder(unsigned int j, unsigned long cursec, ...@@ -1529,11 +1529,11 @@ static inline int reorder(unsigned int j, unsigned long cursec,
if (!(cpp->xdir == DTD_IN)) input_only = FALSE; if (!(cpp->xdir == DTD_IN)) input_only = FALSE;
if (SCpnt->request.sector < minsec) minsec = SCpnt->request.sector; if (SCpnt->request->sector < minsec) minsec = SCpnt->request->sector;
if (SCpnt->request.sector > maxsec) maxsec = SCpnt->request.sector; if (SCpnt->request->sector > maxsec) maxsec = SCpnt->request->sector;
sl[n] = SCpnt->request.sector; sl[n] = SCpnt->request->sector;
ioseek += SCpnt->request.nr_sectors; ioseek += SCpnt->request->nr_sectors;
if (!n) continue; if (!n) continue;
...@@ -1561,7 +1561,7 @@ static inline int reorder(unsigned int j, unsigned long cursec, ...@@ -1561,7 +1561,7 @@ static inline int reorder(unsigned int j, unsigned long cursec,
if (!input_only) for (n = 0; n < n_ready; n++) { if (!input_only) for (n = 0; n < n_ready; n++) {
k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt; k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt;
ll[n] = SCpnt->request.nr_sectors; pl[n] = SCpnt->pid; ll[n] = SCpnt->request->nr_sectors; pl[n] = SCpnt->pid;
if (!n) continue; if (!n) continue;
...@@ -1589,7 +1589,7 @@ static inline int reorder(unsigned int j, unsigned long cursec, ...@@ -1589,7 +1589,7 @@ static inline int reorder(unsigned int j, unsigned long cursec,
" cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
(ihdlr ? "ihdlr" : "qcomm"), SCpnt->channel, SCpnt->target, (ihdlr ? "ihdlr" : "qcomm"), SCpnt->channel, SCpnt->target,
SCpnt->lun, SCpnt->pid, k, flushcount, n_ready, SCpnt->lun, SCpnt->pid, k, flushcount, n_ready,
SCpnt->request.sector, SCpnt->request.nr_sectors, cursec, SCpnt->request->sector, SCpnt->request->nr_sectors, cursec,
YESNO(s), YESNO(r), YESNO(rev), YESNO(input_only), YESNO(s), YESNO(r), YESNO(rev), YESNO(input_only),
YESNO(overlap), cpp->xdir); YESNO(overlap), cpp->xdir);
} }
...@@ -1718,7 +1718,7 @@ static inline void ihdlr(int irq, unsigned int j) { ...@@ -1718,7 +1718,7 @@ static inline void ihdlr(int irq, unsigned int j) {
if (linked_comm && SCpnt->device->queue_depth > 2 if (linked_comm && SCpnt->device->queue_depth > 2
&& TLDEV(SCpnt->device->type)) && TLDEV(SCpnt->device->type))
flush_dev(SCpnt->device, SCpnt->request.sector, j, TRUE); flush_dev(SCpnt->device, SCpnt->request->sector, j, TRUE);
tstatus = status_byte(spp->target_status); tstatus = status_byte(spp->target_status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment