This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Created attachment 354668 [details] original patch from Mike Miller
Created attachment 354670 [details] Mike Miller's patch without fix for 510178, which is already committed
Comment on attachment 354668 [details] original patch from Mike Miller Originally attached for reference only.
Comment from Redhat internal code review: > > @@ -4040,10 +4308,24 @@ static struct pci_driver cciss_pci_driver = { > */ > static int __init cciss_init(void) > { > + int err; > + > printk(KERN_INFO DRIVER_NAME "\n"); > > + err = bus_register(&cciss_bus_type); I did not see a bus_unregister when the module is unloaded.
Created attachment 355289 [details] call bus_unregister in cciss_remove_one Patch to call bus_unregister during module unload.
in kernel-2.6.18-160.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5 Please do NOT transition this bugzilla state to VERIFIED until our QE team has sent specific instructions indicating when to do so. However feel free to provide a comment indicating that this fix has been verified.
Mike Miller, Another problem was noticed after this was accepted, during a late internal code review: ----- > +++ b/drivers/block/cciss.c > > +static ssize_t dev_show_vendor(struct device *dev, > > + struct device_attribute *attr, char *buf) > > +{ > > + drive_info_struct *drv = to_drv(dev); > > + struct ctlr_info *h = to_hba(dev->parent); > > + char vendor[VENDOR_LEN + 1]; > > + unsigned long flags; > > + int ret = 0; > > + > > + spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags); > > + if (h->busy_configuring) > > + ret = -EBUSY; > > + else > > + memcpy(vendor, drv->vendor, VENDOR_LEN + 1); > > + spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); > > + > > + if (ret) > > + return ret; > > + else > > + return snprintf(buf, sizeof(vendor) + 1, "%s\n", drv->vendor); > > +} I do not understand why snprintf uses drv->vendor after you have gone to the trouble of copying it out into auto array vendor[]. > > + memcpy(model, drv->model, MODEL_LEN + 1); > > + return snprintf(buf, sizeof(model) + 1, "%s\n", drv->model); Same here. > > + memcpy(rev, drv->rev, REV_LEN + 1); > > + return snprintf(buf, sizeof(rev) + 1, "%s\n", drv->rev); Here, too. Clearly I misunderstand the intent of the author or fail to read the code. Care to help me out? ----- Can you get a patch for this upstream, and roll it into the next cciss update for rhel5.5? Rob
Not being the original author I'm not sure what the intent may have been. It seem to more of a cosmetic issue than anything but I will submit patches upstream.
Not sure if it is something in sysfs or just udev rule missing, but with kernel-2.6.18-160 and hal-0.5.8.1-52.el5 I don't get /dev/disk/by-id/cciss-* symlinks, while on Fedora they're created (Fedora version tested was F8 with kernel-2.6.23.1-42.fc8 and udev-116-3.fc8)
(In reply to comment #22) > Not sure if it is something in sysfs or just udev rule missing, but with > kernel-2.6.18-160 and hal-0.5.8.1-52.el5 I don't get /dev/disk/by-id/cciss-* > symlinks, while on Fedora they're created (Fedora version tested was F8 with > kernel-2.6.23.1-42.fc8 and udev-116-3.fc8) scsi_id doesn't work with cciss - meaning driver doesn't support SCSI INQUIRY?
workaround using cciss_id (from device-mapper-multipath RPM) /lib/udev/cciss.sh: #!/bin/sh echo ID_SERIAL=$(/sbin/cciss_id $1) /etc/udev/rules.d/60-cciss.rules: KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="", IMPORT{program}="cciss.sh %p", ENV{ID_BUS}="cciss" KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" KERNEL=="cciss*p[0-9]*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-1243.html