Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757893AbYGPSqi (ORCPT ); Wed, 16 Jul 2008 14:46:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753382AbYGPSq3 (ORCPT ); Wed, 16 Jul 2008 14:46:29 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:56827 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751670AbYGPSq2 (ORCPT ); Wed, 16 Jul 2008 14:46:28 -0400 Subject: Re: rdac and aac From: Chandra Seetharaman Reply-To: sekharan@us.ibm.com To: Yinghai Lu Cc: Ingo Molnar , James Bottomley , Mark Salyzyn , Linux Kernel Mailing List , Linux-Scsi In-Reply-To: <86802c440807161051r7632c1d3qeb73c3cc1a124ed6@mail.gmail.com> References: <86802c440807161051r7632c1d3qeb73c3cc1a124ed6@mail.gmail.com> Content-Type: text/plain Organization: IBM Date: Wed, 16 Jul 2008 11:46:01 -0700 Message-Id: <1216233961.27507.225.camel@chandra-ubuntu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6699 Lines: 166 Please test with the attached patch and see if it works. regards, chandra --------------------- Signed-off-by: Chandra Seetharaman -- Index: linux2.6.26-git3/drivers/scsi/device_handler/scsi_dh_rdac.c =================================================================== --- linux2.6.26-git3.orig/drivers/scsi/device_handler/scsi_dh_rdac.c +++ linux2.6.26-git3/drivers/scsi/device_handler/scsi_dh_rdac.c @@ -608,12 +608,17 @@ static int rdac_bus_notify(struct notifi unsigned long action, void *data) { struct device *dev = data; - struct scsi_device *sdev = to_scsi_device(dev); + struct scsi_device *sdev; struct scsi_dh_data *scsi_dh_data; struct rdac_dh_data *h; int i, found = 0; unsigned long flags; + if (!scsi_is_sdev_device(dev)) + return 0; + + sdev = to_scsi_device(dev); + if (action == BUS_NOTIFY_ADD_DEVICE) { for (i = 0; rdac_dev_list[i].vendor; i++) { if (!strncmp(sdev->vendor, rdac_dev_list[i].vendor, Index: linux2.6.26-git3/drivers/scsi/device_handler/scsi_dh_emc.c =================================================================== --- linux2.6.26-git3.orig/drivers/scsi/device_handler/scsi_dh_emc.c +++ linux2.6.26-git3/drivers/scsi/device_handler/scsi_dh_emc.c @@ -416,12 +416,17 @@ static int clariion_bus_notify(struct no unsigned long action, void *data) { struct device *dev = data; - struct scsi_device *sdev = to_scsi_device(dev); + struct scsi_device *sdev; struct scsi_dh_data *scsi_dh_data; struct clariion_dh_data *h; int i, found = 0; unsigned long flags; + if (!scsi_is_sdev_device(dev)) + return 0; + + sdev = to_scsi_device(dev); + if (action == BUS_NOTIFY_ADD_DEVICE) { for (i = 0; clariion_dev_list[i].vendor; i++) { if (!strncmp(sdev->vendor, clariion_dev_list[i].vendor, Index: linux2.6.26-git3/drivers/scsi/device_handler/scsi_dh_hp_sw.c =================================================================== --- linux2.6.26-git3.orig/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ linux2.6.26-git3/drivers/scsi/device_handler/scsi_dh_hp_sw.c @@ -131,11 +131,16 @@ static int hp_sw_bus_notify(struct notif unsigned long action, void *data) { struct device *dev = data; - struct scsi_device *sdev = to_scsi_device(dev); + struct scsi_device *sdev; struct scsi_dh_data *scsi_dh_data; int i, found = 0; unsigned long flags; + if (!scsi_is_sdev_device(dev)) + return 0; + + sdev = to_scsi_device(dev); + if (action == BUS_NOTIFY_ADD_DEVICE) { for (i = 0; hp_sw_dh_data_list[i].vendor; i++) { if (!strncmp(sdev->vendor, hp_sw_dh_data_list[i].vendor, --- On Wed, 2008-07-16 at 10:51 -0700, Yinghai Lu wrote: > calling aac_init+0x0/0x9a > Adaptec aacraid driver 1.1-5[2456]-ms > vendor=10de device=005d > ACPI: PCI Interrupt 0000:86:00.0[A] -> Link [LN2C] -> GSI 42 (level, > low) -> IRQ 42 > PCI: Setting latency timer of device 0000:86:00.0 to 64 > AAC0: kernel 5.2-0[15535] Oct 11 2007 > AAC0: monitor 5.2-0[15535] > AAC0: bios 5.2-0[15535] > AAC0: serial 00721EC0115 > AAC0: Non-DASD support enabled. > AAC0: 64bit support enabled. > AAC0: 64 Bit DAC enabled > scsi0 : aacraid > BUG: unable to handle kernel NULL pointer dereference at 0000000000000003 > IP: [] strncmp+0x1b/0x54 > PGD 0 > Oops: 0000 [1] SMP > CPU 28 > Modules linked in: > Pid: 1, comm: swapper Not tainted 2.6.26-tip-00047-g69a6a3e-dirty #394 > RIP: 0010:[] [] strncmp+0x1b/0x54 > RSP: 0018:ffff883824c579f0 EFLAGS: 00010206 > RAX: 0000000000000000 RBX: ffffffff80ad2190 RCX: 0000000000000000 > RDX: 0000000000000003 RSI: ffffffff80cfe351 RDI: 0000000000000003 > RBP: ffff883824c57a00 R08: 0000000000000000 R09: ffffe200e0774440 > R10: 00000000f6f3ecb9 R11: 00000000f6f3ecb9 R12: ffff88402206c050 > R13: ffff88402206c170 R14: 0000000000000000 R15: ffffffffffffffff > FS: 0000000000000000(0000) GS:ffff884024c3b600(0000) knlGS:0000000000000000 > CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b > CR2: 0000000000000003 CR3: 0000000000201000 CR4: 00000000000006e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 > Process swapper (pid: 1, threadinfo ffff883824c56000, task ffff883024c58000) > Stack: ffffffff80e705d0 00000000f6f3ecb9 ffff883824c57a50 ffffffff806ab127 > ffffe200e0774440 00000000f6f3ecb9 00000000f6f3ecb9 0000000000000000 > 00000000ffffffff 0000000000000000 ffff88402206c170 0000000000000001 > Call Trace: > [] rdac_bus_notify+0x68/0x235 > [] notifier_call_chain+0x45/0x84 > [] __blocking_notifier_call_chain+0x61/0x92 > [] blocking_notifier_call_chain+0x27/0x3d > [] device_add+0xf5/0x4fd > [] ? scsi_setup_command_freelist+0x6c/0xc6 > [] scsi_add_host+0xc5/0x20f > [] aac_probe_one+0x3ef/0x4ba > [] pci_device_probe+0xd5/0x142 > [] driver_probe_device+0xd4/0x199 > [] ? down+0x4b/0x68 > [] __driver_attach+0x63/0xa4 > [] ? __driver_attach+0x0/0xa4 > [] bus_for_each_dev+0x63/0xb1 > [] driver_attach+0x34/0x4a > [] bus_add_driver+0xcb/0x22b > [] ? kset_find_obj+0x4c/0x96 > [] driver_register+0xbc/0x153 > [] ? read_tsc+0x9/0x1c > [] __pci_register_driver+0x67/0xb8 > [] ? aac_init+0x0/0x9a > [] aac_init+0x4b/0x9a > [] kernel_init+0x1de/0x346 > [] ? mcount_call+0x5/0x31 > [] ? finish_task_switch+0x14/0xe3 > [] child_rip+0xa/0x11 > [] ? kernel_init+0x0/0x346 > [] ? child_rip+0x0/0x11 > > > Code: 28 00 00 00 0f be c0 74 05 e8 0e 74 d4 ff c9 c3 55 31 c9 48 89 > e5 48 83 ec 10 65 48 8b 04 25 28 00 00 00 48 89 45 f8 31 c0 eb 19 <44> > 8a 04 0f 44 88 c0 2a 04 0e 84 c0 75 12 48 ff c1 45 84 c0 74 > RIP [] strncmp+0x1b/0x54 > RSP > CR2: 0000000000000003 > ---[ end trace c89c20984b386ade ]--- > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/