aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acorn
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2007-06-20 07:53:23 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-07-10 02:03:34 -0400
commite654bc4393e85e326993256d80b9710a4d6411ff (patch)
treebf30413fd62f778e4c9abd8bc92e7a399ac37e53 /drivers/acorn
parent9cff3b383dad193b0762c27278a16237e10b53dc (diff)
[PATCH] fix request->cmd == INT cases
- I have unearthed very old bugs in stale drivers that still used request->cmd as a READ|WRITE int - This patch is maybe a proof that these drivers have not been used for a long time. Should they be removed completely? Drivers that currently do not work for sure: drivers/acorn/block/fd1772.c | 2 +- drivers/acorn/block/mfmhd.c | 8 ++++---- drivers/cdrom/aztcd.c | 2 +- drivers/cdrom/cm206.c | 2 +- drivers/cdrom/gscd.c | 2 +- drivers/cdrom/mcdx.c | 2 +- drivers/cdrom/optcd.c | 2 +- drivers/cdrom/sjcd.c | 2 +- Drivers with cosmetic fixes only: b/drivers/block/amiflop.c b/drivers/block/nbd.c b/drivers/ide/legacy/hd.c Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/acorn')
-rw-r--r--drivers/acorn/block/fd1772.c2
-rw-r--r--drivers/acorn/block/mfmhd.c13
2 files changed, 4 insertions, 11 deletions
diff --git a/drivers/acorn/block/fd1772.c b/drivers/acorn/block/fd1772.c
index 674bf81c6e66..423ed08fb6f7 100644
--- a/drivers/acorn/block/fd1772.c
+++ b/drivers/acorn/block/fd1772.c
@@ -1246,7 +1246,7 @@ repeat:
1246 del_timer(&motor_off_timer); 1246 del_timer(&motor_off_timer);
1247 1247
1248 ReqCnt = 0; 1248 ReqCnt = 0;
1249 ReqCmd = CURRENT->cmd; 1249 ReqCmd = rq_data_dir(CURRENT);
1250 ReqBlock = CURRENT->sector; 1250 ReqBlock = CURRENT->sector;
1251 ReqBuffer = CURRENT->buffer; 1251 ReqBuffer = CURRENT->buffer;
1252 setup_req_params(drive); 1252 setup_req_params(drive);
diff --git a/drivers/acorn/block/mfmhd.c b/drivers/acorn/block/mfmhd.c
index 689a4c3542ba..d85520f78e68 100644
--- a/drivers/acorn/block/mfmhd.c
+++ b/drivers/acorn/block/mfmhd.c
@@ -439,7 +439,7 @@ static void mfm_rw_intr(void)
439 a choice of command end or some data which is ready to be collected */ 439 a choice of command end or some data which is ready to be collected */
440 /* I think we have to transfer data while the interrupt line is on and its 440 /* I think we have to transfer data while the interrupt line is on and its
441 not any other type of interrupt */ 441 not any other type of interrupt */
442 if (CURRENT->cmd == WRITE) { 442 if (rq_data_dir(CURRENT) == WRITE) {
443 extern void hdc63463_writedma(void); 443 extern void hdc63463_writedma(void);
444 if ((hdc63463_dataleft <= 0) && (!(mfm_status & STAT_CED))) { 444 if ((hdc63463_dataleft <= 0) && (!(mfm_status & STAT_CED))) {
445 printk("mfm_rw_intr: Apparent DMA write request when no more to DMA\n"); 445 printk("mfm_rw_intr: Apparent DMA write request when no more to DMA\n");
@@ -799,7 +799,7 @@ static void issue_request(unsigned int block, unsigned int nsect,
799 raw_cmd.head = start_head; 799 raw_cmd.head = start_head;
800 raw_cmd.cylinder = track / p->heads; 800 raw_cmd.cylinder = track / p->heads;
801 raw_cmd.cmdtype = CURRENT->cmd; 801 raw_cmd.cmdtype = CURRENT->cmd;
802 raw_cmd.cmdcode = CURRENT->cmd == WRITE ? CMD_WD : CMD_RD; 802 raw_cmd.cmdcode = rq_data_dir(CURRENT) == WRITE ? CMD_WD : CMD_RD;
803 raw_cmd.cmddata[0] = dev + 1; /* DAG: +1 to get US */ 803 raw_cmd.cmddata[0] = dev + 1; /* DAG: +1 to get US */
804 raw_cmd.cmddata[1] = raw_cmd.head; 804 raw_cmd.cmddata[1] = raw_cmd.head;
805 raw_cmd.cmddata[2] = raw_cmd.cylinder >> 8; 805 raw_cmd.cmddata[2] = raw_cmd.cylinder >> 8;
@@ -830,7 +830,7 @@ static void issue_request(unsigned int block, unsigned int nsect,
830 hdc63463_dataleft = nsect * 256; /* Better way? */ 830 hdc63463_dataleft = nsect * 256; /* Better way? */
831 831
832 DBG("mfm%c: %sing: CHS=%d/%d/%d, sectors=%d, buffer=0x%08lx (%p)\n", 832 DBG("mfm%c: %sing: CHS=%d/%d/%d, sectors=%d, buffer=0x%08lx (%p)\n",
833 raw_cmd.dev + 'a', (CURRENT->cmd == READ) ? "read" : "writ", 833 raw_cmd.dev + 'a', rq_data_dir(CURRENT) == READ ? "read" : "writ",
834 raw_cmd.cylinder, 834 raw_cmd.cylinder,
835 raw_cmd.head, 835 raw_cmd.head,
836 raw_cmd.sector, nsect, (unsigned long) Copy_buffer, CURRENT); 836 raw_cmd.sector, nsect, (unsigned long) Copy_buffer, CURRENT);
@@ -917,13 +917,6 @@ static void mfm_request(void)
917 917
918 DBG("mfm_request: block after offset=%d\n", block); 918 DBG("mfm_request: block after offset=%d\n", block);
919 919
920 if (CURRENT->cmd != READ && CURRENT->cmd != WRITE) {
921 printk("unknown mfm-command %d\n", CURRENT->cmd);
922 end_request(CURRENT, 0);
923 Busy = 0;
924 printk("mfm: continue 4\n");
925 continue;
926 }
927 issue_request(block, nsect, CURRENT); 920 issue_request(block, nsect, CURRENT);
928 921
929 break; 922 break;