* [PATCH 2.6.15-rc5 1/1] sgiioc4: check for no hwifs available
@ 2005-12-14 1:17 Jeremy Higdon
2005-12-14 21:12 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Higdon @ 2005-12-14 1:17 UTC (permalink / raw)
To: linux-ide; +Cc: jrn, maule
Add a check to the sgiioc4 driver for the case where all available
ide_hwifs structures are in use.
Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
--- linux-2.6.15-rc5/drivers/ide/pci/sgiioc4.c 2005-12-03 21:10:42.000000000 -0800
+++ linux-2.6.15-rc5-new/drivers/ide/pci/sgiioc4.c 2005-12-13 01:03:52.000000000 -0800
@@ -622,12 +622,18 @@
ide_hwif_t *hwif;
int h;
+ /*
+ * Find an empty HWIF; if none available, return -ENOMEM.
+ */
for (h = 0; h < MAX_HWIFS; ++h) {
hwif = &ide_hwifs[h];
- /* Find an empty HWIF */
if (hwif->chipset == ide_unknown)
break;
}
+ if (h == MAX_HWIFS) {
+ printk(KERN_ERR "%s: too many IDE interfaces, no room in table\n", d->name);
+ return -ENOMEM;
+ }
/* Get the CmdBlk and CtrlBlk Base Registers */
base = pci_resource_start(dev, 0) + IOC4_CMD_OFFSET;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.15-rc5 1/1] sgiioc4: check for no hwifs available
2005-12-14 1:17 [PATCH 2.6.15-rc5 1/1] sgiioc4: check for no hwifs available Jeremy Higdon
@ 2005-12-14 21:12 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-12-14 21:12 UTC (permalink / raw)
To: Jeremy Higdon; +Cc: linux-ide, jrn, maule
applied, thanks
On 12/14/05, Jeremy Higdon <jeremy@sgi.com> wrote:
> Add a check to the sgiioc4 driver for the case where all available
> ide_hwifs structures are in use.
>
> Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-14 21:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-14 1:17 [PATCH 2.6.15-rc5 1/1] sgiioc4: check for no hwifs available Jeremy Higdon
2005-12-14 21:12 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).