aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cd.c2
-rw-r--r--drivers/ide/ide-floppy.c2
-rw-r--r--drivers/ide/ide-taskfile.c13
-rw-r--r--drivers/ide/legacy/hd.c2
-rw-r--r--drivers/ide/pci/amd74xx.c7
-rw-r--r--drivers/ide/pci/generic.c19
-rw-r--r--drivers/ide/pci/sgiioc4.c9
7 files changed, 35 insertions, 19 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index bddfebdf91d8..88214943d00a 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -724,7 +724,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
724 * if we have an error, pass back CHECK_CONDITION as the 724 * if we have an error, pass back CHECK_CONDITION as the
725 * scsi status byte 725 * scsi status byte
726 */ 726 */
727 if (!rq->errors) 727 if (blk_pc_request(rq) && !rq->errors)
728 rq->errors = SAM_STAT_CHECK_CONDITION; 728 rq->errors = SAM_STAT_CHECK_CONDITION;
729 729
730 /* Check for tray open. */ 730 /* Check for tray open. */
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 8ccee9c769f8..e3a267622bb6 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -1635,7 +1635,7 @@ static int idefloppy_begin_format(ide_drive_t *drive, int __user *arg)
1635/* 1635/*
1636** Get ATAPI_FORMAT_UNIT progress indication. 1636** Get ATAPI_FORMAT_UNIT progress indication.
1637** 1637**
1638** Userland gives a pointer to an int. The int is set to a progresss 1638** Userland gives a pointer to an int. The int is set to a progress
1639** indicator 0-65536, with 65536=100%. 1639** indicator 0-65536, with 65536=100%.
1640** 1640**
1641** If the drive does not support format progress indication, we just check 1641** If the drive does not support format progress indication, we just check
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 1d0470c1f957..30175c7688e8 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -524,8 +524,8 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
524 task_ioreg_t *hobsptr = args.hobRegister; 524 task_ioreg_t *hobsptr = args.hobRegister;
525 int err = 0; 525 int err = 0;
526 int tasksize = sizeof(struct ide_task_request_s); 526 int tasksize = sizeof(struct ide_task_request_s);
527 int taskin = 0; 527 unsigned int taskin = 0;
528 int taskout = 0; 528 unsigned int taskout = 0;
529 u8 io_32bit = drive->io_32bit; 529 u8 io_32bit = drive->io_32bit;
530 char __user *buf = (char __user *)arg; 530 char __user *buf = (char __user *)arg;
531 531
@@ -538,8 +538,13 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
538 return -EFAULT; 538 return -EFAULT;
539 } 539 }
540 540
541 taskout = (int) req_task->out_size; 541 taskout = req_task->out_size;
542 taskin = (int) req_task->in_size; 542 taskin = req_task->in_size;
543
544 if (taskin > 65536 || taskout > 65536) {
545 err = -EINVAL;
546 goto abort;
547 }
543 548
544 if (taskout) { 549 if (taskout) {
545 int outtotal = tasksize; 550 int outtotal = tasksize;
diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c
index b1d5291531b7..45ed03591cd8 100644
--- a/drivers/ide/legacy/hd.c
+++ b/drivers/ide/legacy/hd.c
@@ -459,7 +459,7 @@ ok_to_read:
459#ifdef DEBUG 459#ifdef DEBUG
460 printk("%s: read: sector %ld, remaining = %ld, buffer=%p\n", 460 printk("%s: read: sector %ld, remaining = %ld, buffer=%p\n",
461 req->rq_disk->disk_name, req->sector, req->nr_sectors, 461 req->rq_disk->disk_name, req->sector, req->nr_sectors,
462 req->buffer+512)); 462 req->buffer+512);
463#endif 463#endif
464 if (req->current_nr_sectors <= 0) 464 if (req->current_nr_sectors <= 0)
465 end_request(req, 1); 465 end_request(req, 1);
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
index 2b0ea8b6608d..753fe0e21456 100644
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -75,6 +75,7 @@ static struct amd_ide_chip {
75 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, 0x50, AMD_UDMA_133 }, 75 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, 0x50, AMD_UDMA_133 },
76 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, 0x50, AMD_UDMA_133 }, 76 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, 0x50, AMD_UDMA_133 },
77 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, 0x50, AMD_UDMA_133 }, 77 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, 0x50, AMD_UDMA_133 },
78 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE, 0x50, AMD_UDMA_133 },
78 { PCI_DEVICE_ID_AMD_CS5536_IDE, 0x40, AMD_UDMA_100 }, 79 { PCI_DEVICE_ID_AMD_CS5536_IDE, 0x40, AMD_UDMA_100 },
79 { 0 } 80 { 0 }
80}; 81};
@@ -491,7 +492,8 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
491 /* 16 */ DECLARE_NV_DEV("NFORCE-MCP55"), 492 /* 16 */ DECLARE_NV_DEV("NFORCE-MCP55"),
492 /* 17 */ DECLARE_NV_DEV("NFORCE-MCP61"), 493 /* 17 */ DECLARE_NV_DEV("NFORCE-MCP61"),
493 /* 18 */ DECLARE_NV_DEV("NFORCE-MCP65"), 494 /* 18 */ DECLARE_NV_DEV("NFORCE-MCP65"),
494 /* 19 */ DECLARE_AMD_DEV("AMD5536"), 495 /* 19 */ DECLARE_NV_DEV("NFORCE-MCP67"),
496 /* 20 */ DECLARE_AMD_DEV("AMD5536"),
495}; 497};
496 498
497static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) 499static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
@@ -530,7 +532,8 @@ static struct pci_device_id amd74xx_pci_tbl[] = {
530 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 }, 532 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 },
531 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 }, 533 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 },
532 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18 }, 534 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18 },
533 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19 }, 535 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19 },
536 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20 },
534 { 0, }, 537 { 0, },
535}; 538};
536MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl); 539MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl);
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
index 5b77a5bcbf0c..9f306880491a 100644
--- a/drivers/ide/pci/generic.c
+++ b/drivers/ide/pci/generic.c
@@ -40,6 +40,19 @@
40 40
41static int ide_generic_all; /* Set to claim all devices */ 41static int ide_generic_all; /* Set to claim all devices */
42 42
43/*
44 * the module_param_named() was added for the modular case
45 * the __setup() is left as compatibility for existing setups
46 */
47#ifndef MODULE
48static int __init ide_generic_all_on(char *unused)
49{
50 ide_generic_all = 1;
51 printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n");
52 return 1;
53}
54__setup("all-generic-ide", ide_generic_all_on);
55#endif
43module_param_named(all_generic_ide, ide_generic_all, bool, 0444); 56module_param_named(all_generic_ide, ide_generic_all, bool, 0444);
44MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers."); 57MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers.");
45 58
@@ -234,8 +247,10 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
234 (!(PCI_FUNC(dev->devfn) & 1))) 247 (!(PCI_FUNC(dev->devfn) & 1)))
235 goto out; 248 goto out;
236 249
237 if (dev->vendor == PCI_VENDOR_ID_JMICRON && PCI_FUNC(dev->devfn) != 1) 250 if (dev->vendor == PCI_VENDOR_ID_JMICRON) {
238 goto out; 251 if (dev->device != PCI_DEVICE_ID_JMICRON_JMB368 && PCI_FUNC(dev->devfn) != 1)
252 goto out;
253 }
239 254
240 if (dev->vendor != PCI_VENDOR_ID_JMICRON) { 255 if (dev->vendor != PCI_VENDOR_ID_JMICRON) {
241 pci_read_config_word(dev, PCI_COMMAND, &command); 256 pci_read_config_word(dev, PCI_COMMAND, &command);
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index f3fe287fbd89..cfad09accf52 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -768,14 +768,7 @@ ioc4_ide_init(void)
768 return ioc4_register_submodule(&ioc4_ide_submodule); 768 return ioc4_register_submodule(&ioc4_ide_submodule);
769} 769}
770 770
771static void __devexit 771late_initcall(ioc4_ide_init); /* Call only after IDE init is done */
772ioc4_ide_exit(void)
773{
774 ioc4_unregister_submodule(&ioc4_ide_submodule);
775}
776
777module_init(ioc4_ide_init);
778module_exit(ioc4_ide_exit);
779 772
780MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon"); 773MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon");
781MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card"); 774MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card");