Re: [PATCH 3/21] advansys: Convert to pci_register_driver interface

2007-07-27 Thread Jeff Garzik
Matthew Wilcox wrote: On Thu, Jul 26, 2007 at 03:31:21PM -0400, Jeff Garzik wrote: 2) you dropped the check for pci_resource_start() returning zero (look for 'iop == 0' in original code) That's not actually something that could happen through that path. Er, huh? It's a value returned from t

Re: [PATCH 3/21] advansys: Convert to pci_register_driver interface

2007-07-26 Thread Jeff Garzik
I'll respond to the other stuff soon, but I wanted to add: + for (i = 0; i < asc_board_count; i++) { + struct Scsi_Host *host = asc_host[i]; + if (!host) + continue; + scsi_remove_host(host); + advansys_release(

Re: [PATCH 3/21] advansys: Convert to pci_register_driver interface

2007-07-26 Thread Matthew Wilcox
On Thu, Jul 26, 2007 at 03:31:21PM -0400, Jeff Garzik wrote: > 1) you should propagate pci_enable_device return value to caller on error ok. I'll return -ENODEV if I don't get a Scsi_Host back, though. Unless you think it's worth going through the PTR_ERR/IS_ERR/ERR_PTR hooplah. It's not like th

Re: [PATCH 3/21] advansys: Convert to pci_register_driver interface

2007-07-26 Thread Jeff Garzik
Matthew Wilcox wrote: +static int __devinit +advansys_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) +{ + int ioport; + struct Scsi_Host *shost; + + if (pci_enable_device(pdev)) + goto fail; + + ioport = pci_resource_start(pdev, 0); +

Re: [PATCH 3/21] advansys: Convert to pci_register_driver interface

2007-07-26 Thread Jeff Garzik
Reading this more, this commit breaks everything AFAICS. You still use scsi_register, which populates ->legacy_hosts list, but no longer include scsi_module.c. Thus you alloc a bunch of scsi hosts, and... that's it. They are never added, nor scanned. Take a look at my gdth conversion, 'gdt

[PATCH 3/21] advansys: Convert to pci_register_driver interface

2007-07-26 Thread Matthew Wilcox
- Add a pci_driver interface for the PCI advansys devices. - For ISA/EISA/VLB devices, we still call advansys_detect and advansys_release. - Many functions are converted from __init to __devinit to allow hotplug PCI to work. - Remove some now-unused macros and struct definitions Signed-o