Commit 664336a2 authored by Russell King's avatar Russell King

[ARM] Update Acorn SCSI drivers.

Update acornscsi.c for host/device structure changes.
Clean up scsi_pointer initialisation.
parent 8a59bcb1
...@@ -2521,19 +2521,19 @@ void acornscsi_intr(int irq, void *dev_id, struct pt_regs *regs) ...@@ -2521,19 +2521,19 @@ void acornscsi_intr(int irq, void *dev_id, struct pt_regs *regs)
*/ */
int acornscsi_queuecmd(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) int acornscsi_queuecmd(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
{ {
AS_Host *host = (AS_Host *)SCpnt->host->hostdata; AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata;
if (!done) { if (!done) {
/* there should be some way of rejecting errors like this without panicing... */ /* there should be some way of rejecting errors like this without panicing... */
panic("scsi%d: queuecommand called with NULL done function [cmd=%p]", panic("scsi%d: queuecommand called with NULL done function [cmd=%p]",
SCpnt->host->host_no, SCpnt); host->host->host_no, SCpnt);
return -EINVAL; return -EINVAL;
} }
#if (DEBUG & DEBUG_NO_WRITE) #if (DEBUG & DEBUG_NO_WRITE)
if (acornscsi_cmdtype(SCpnt->cmnd[0]) == CMD_WRITE && (NO_WRITE & (1 << SCpnt->device->id))) { if (acornscsi_cmdtype(SCpnt->cmnd[0]) == CMD_WRITE && (NO_WRITE & (1 << SCpnt->device->id))) {
printk(KERN_CRIT "scsi%d.%c: WRITE attempted with NO_WRITE flag set\n", printk(KERN_CRIT "scsi%d.%c: WRITE attempted with NO_WRITE flag set\n",
SCpnt->host->host_no, '0' + SCpnt->device->id); host->host->host_no, '0' + SCpnt->device->id);
SCpnt->result = DID_NO_CONNECT << 16; SCpnt->result = DID_NO_CONNECT << 16;
done(SCpnt); done(SCpnt);
return 0; return 0;
...@@ -2695,7 +2695,7 @@ acornscsi_do_abort(AS_Host *host, Scsi_Cmnd *SCpnt) ...@@ -2695,7 +2695,7 @@ acornscsi_do_abort(AS_Host *host, Scsi_Cmnd *SCpnt)
*/ */
int acornscsi_abort(Scsi_Cmnd *SCpnt) int acornscsi_abort(Scsi_Cmnd *SCpnt)
{ {
AS_Host *host = (AS_Host *) SCpnt->host->hostdata; AS_Host *host = (AS_Host *) SCpnt->device->host->hostdata;
int result; int result;
host->stats.aborts += 1; host->stats.aborts += 1;
...@@ -2782,7 +2782,7 @@ int acornscsi_abort(Scsi_Cmnd *SCpnt) ...@@ -2782,7 +2782,7 @@ int acornscsi_abort(Scsi_Cmnd *SCpnt)
*/ */
int acornscsi_reset(Scsi_Cmnd *SCpnt, unsigned int reset_flags) int acornscsi_reset(Scsi_Cmnd *SCpnt, unsigned int reset_flags)
{ {
AS_Host *host = (AS_Host *)SCpnt->host->hostdata; AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata;
Scsi_Cmnd *SCptr; Scsi_Cmnd *SCptr;
host->stats.resets += 1; host->stats.resets += 1;
......
...@@ -68,8 +68,7 @@ static inline void put_next_SCp_byte(Scsi_Pointer *SCp, unsigned char c) ...@@ -68,8 +68,7 @@ static inline void put_next_SCp_byte(Scsi_Pointer *SCp, unsigned char c)
static inline void init_SCp(Scsi_Cmnd *SCpnt) static inline void init_SCp(Scsi_Cmnd *SCpnt)
{ {
SCpnt->SCp.Message = 0; memset(&SCpnt->SCp, 0, sizeof(struct scsi_pointer));
SCpnt->SCp.Status = 0;
if (SCpnt->use_sg) { if (SCpnt->use_sg) {
unsigned long len = 0; unsigned long len = 0;
...@@ -97,8 +96,6 @@ static inline void init_SCp(Scsi_Cmnd *SCpnt) ...@@ -97,8 +96,6 @@ static inline void init_SCp(Scsi_Cmnd *SCpnt)
SCpnt->request_bufflen = len; SCpnt->request_bufflen = len;
#endif #endif
} else { } else {
SCpnt->SCp.buffer = NULL;
SCpnt->SCp.buffers_residual = 0;
SCpnt->SCp.ptr = (unsigned char *)SCpnt->request_buffer; SCpnt->SCp.ptr = (unsigned char *)SCpnt->request_buffer;
SCpnt->SCp.this_residual = SCpnt->request_bufflen; SCpnt->SCp.this_residual = SCpnt->request_bufflen;
} }
......
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