summaryrefslogtreecommitdiffstats
path: root/uClinux-2.4.20-uc1/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'uClinux-2.4.20-uc1/drivers/scsi/scsi_error.c')
-rw-r--r--uClinux-2.4.20-uc1/drivers/scsi/scsi_error.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/uClinux-2.4.20-uc1/drivers/scsi/scsi_error.c b/uClinux-2.4.20-uc1/drivers/scsi/scsi_error.c
index ace08b8..59b4352 100644
--- a/uClinux-2.4.20-uc1/drivers/scsi/scsi_error.c
+++ b/uClinux-2.4.20-uc1/drivers/scsi/scsi_error.c
@@ -387,6 +387,11 @@ STATIC int scsi_eh_retry_command(Scsi_Cmnd * SCpnt)
{
memcpy((void *) SCpnt->cmnd, (void *) SCpnt->data_cmnd,
sizeof(SCpnt->data_cmnd));
+#ifdef CONFIG_BOARD_W90N745
+ memcpy((void *) ((unsigned char *)((unsigned long)SCpnt->cmnd|0x80000000)),
+ (void *) SCpnt->data_cmnd,
+ sizeof(SCpnt->data_cmnd));
+#endif
SCpnt->request_buffer = SCpnt->buffer;
SCpnt->request_bufflen = SCpnt->bufflen;
SCpnt->use_sg = SCpnt->old_use_sg;
@@ -428,16 +433,33 @@ STATIC int scsi_request_sense(Scsi_Cmnd * SCpnt)
memcpy((void *) SCpnt->cmnd, (void *) generic_sense,
sizeof(generic_sense));
+#ifdef CONFIG_BOARD_W90N745
+ memcpy((void *)((unsigned char *)((unsigned long)SCpnt->cmnd|0x80000000)),
+ (void *) generic_sense,
+ sizeof(generic_sense));
+#endif
+
if (SCpnt->device->scsi_level <= SCSI_2)
SCpnt->cmnd[1] = SCpnt->lun << 5;
+#ifdef CONFIG_BOARD_W90N745
+ ((unsigned char *)((unsigned long)SCpnt->cmnd|0x80000000))[1] = SCpnt->lun << 5;
+#endif
+#ifndef CONFIG_BOARD_W90N745
scsi_result = (!SCpnt->host->hostt->unchecked_isa_dma)
? &scsi_result0[0] : kmalloc(512, GFP_ATOMIC | GFP_DMA);
+#else
+ scsi_result = (unsigned char *)kmalloc(sizeof(unsigned char) * 256, GFP_ATOMIC);
+#endif
if (scsi_result == NULL) {
printk("cannot allocate scsi_result in scsi_request_sense.\n");
return FAILED;
}
+#ifdef CONFIG_BOARD_W90N745
+ scsi_result = (unsigned char *)((unsigned long)scsi_result | 0x80000000);
+#endif
+
/*
* Zero the sense buffer. Some host adapters automatically always request
* sense, so it is not a good idea that SCpnt->request_buffer and
@@ -463,8 +485,13 @@ STATIC int scsi_request_sense(Scsi_Cmnd * SCpnt)
SCpnt->request_buffer,
sizeof(SCpnt->sense_buffer));
+#ifndef CONFIG_BOARD_W90N745
if (scsi_result != &scsi_result0[0] && scsi_result != NULL)
kfree(scsi_result);
+#else
+ if(scsi_result != NULL)
+ kfree(scsi_result);
+#endif
/*
* When we eventually call scsi_finish, we really wish to complete
@@ -472,6 +499,11 @@ STATIC int scsi_request_sense(Scsi_Cmnd * SCpnt)
*/
memcpy((void *) SCpnt->cmnd, (void *) SCpnt->data_cmnd,
sizeof(SCpnt->data_cmnd));
+#ifdef CONFIG_BOARD_W90N745
+ memcpy((void *)((unsigned char *)((unsigned long)SCpnt->cmnd|0x80000000)),
+ (void *) SCpnt->data_cmnd,
+ sizeof(SCpnt->data_cmnd));
+#endif
SCpnt->result = saved_result;
SCpnt->request_buffer = SCpnt->buffer;
SCpnt->request_bufflen = SCpnt->bufflen;
@@ -500,8 +532,17 @@ STATIC int scsi_test_unit_ready(Scsi_Cmnd * SCpnt)
memcpy((void *) SCpnt->cmnd, (void *) tur_command,
sizeof(tur_command));
+#ifdef CONFIG_BOARD_W90N745
+ memcpy((void *)((unsigned char *)((unsigned long)SCpnt->cmnd|0x80000000)),
+ (void *) tur_command,
+ sizeof(tur_command));
+#endif
+
if (SCpnt->device->scsi_level <= SCSI_2)
SCpnt->cmnd[1] = SCpnt->lun << 5;
+#ifdef CONFIG_BOARD_W90N745
+ ((unsigned char *)((unsigned long)SCpnt->cmnd | 0x80000000))[1] = SCpnt->lun << 5;
+#endif
/*
* Zero the sense buffer. The SCSI spec mandates that any
@@ -524,6 +565,11 @@ STATIC int scsi_test_unit_ready(Scsi_Cmnd * SCpnt)
*/
memcpy((void *) SCpnt->cmnd, (void *) SCpnt->data_cmnd,
sizeof(SCpnt->data_cmnd));
+#ifdef CONFIG_BOARD_W90N745
+ memcpy((void *)((unsigned char *)((unsigned long)SCpnt->cmnd | 0x80000000)),
+ (void *) SCpnt->data_cmnd,
+ sizeof(SCpnt->data_cmnd));
+#endif
SCpnt->request_buffer = SCpnt->buffer;
SCpnt->request_bufflen = SCpnt->bufflen;
SCpnt->use_sg = SCpnt->old_use_sg;