Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-11 Thread H. Peter Anvin
Greg KH wrote: On Mon, Feb 11, 2008 at 06:35:16PM -0500, Konrad Rzeszutek wrote: + if (hdr->id == id_nic) { + pci_dev = pci_get_bus_and_slot((nic->pci_bdf & 0xff00) >> 8, + (nic->pci_bdf & 0xff)); pci_get_bus_and_slot fails in

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-11 Thread Greg KH
On Mon, Feb 11, 2008 at 06:35:16PM -0500, Konrad Rzeszutek wrote: > > > + if (hdr->id == id_nic) { > > > + pci_dev = pci_get_bus_and_slot((nic->pci_bdf & 0xff00) >> > > > 8, + (nic->pci_bdf & 0xff)); > > pci_get_bus_and_slot fails in

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-11 Thread Konrad Rzeszutek
> > + if (hdr->id == id_nic) { > > + pci_dev = pci_get_bus_and_slot((nic->pci_bdf & 0xff00) >> > > 8, + (nic->pci_bdf & 0xff)); > pci_get_bus_and_slot fails in the presence of PCI domains, which are > getting to be fairly common even

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-11 Thread Greg KH
On Mon, Feb 11, 2008 at 06:35:16PM -0500, Konrad Rzeszutek wrote: + if (hdr-id == id_nic) { + pci_dev = pci_get_bus_and_slot((nic-pci_bdf 0xff00) 8, + (nic-pci_bdf 0xff)); pci_get_bus_and_slot fails in the presence of

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-11 Thread H. Peter Anvin
Greg KH wrote: On Mon, Feb 11, 2008 at 06:35:16PM -0500, Konrad Rzeszutek wrote: + if (hdr-id == id_nic) { + pci_dev = pci_get_bus_and_slot((nic-pci_bdf 0xff00) 8, + (nic-pci_bdf 0xff)); pci_get_bus_and_slot fails in the

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-11 Thread Konrad Rzeszutek
+ if (hdr-id == id_nic) { + pci_dev = pci_get_bus_and_slot((nic-pci_bdf 0xff00) 8, + (nic-pci_bdf 0xff)); pci_get_bus_and_slot fails in the presence of PCI domains, which are getting to be fairly common even in medium

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread James Bottomley
On Fri, 2008-02-08 at 23:10 -0400, Konrad Rzeszutek wrote: > + if (hdr->id == id_nic) { > + pci_dev = pci_get_bus_and_slot((nic->pci_bdf & 0xff00) >> 8, > + (nic->pci_bdf & 0xff)); > + if (pci_dev) { > +

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread James Bottomley
On Fri, 2008-02-08 at 23:10 -0400, Konrad Rzeszutek wrote: > + ibft_device = kmalloc(len, GFP_KERNEL); > + if (!ibft_device) > + return -ENOMEM; > + > + memcpy(ibft_device, hdr, len); This piece looks a bit odd. you're making ibft_device an exact duplicate of

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread James Bottomley
On Fri, 2008-02-08 at 23:10 -0400, Konrad Rzeszutek wrote: > +/* > + * Physical location of iSCSI Boot Format Table. This is now the Virtual address, isn't it? So just drop the Physical. > + */ > +unsigned long ibft_addr; > +EXPORT_SYMBOL(ibft_addr); And since it is the virtual address,

REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread Konrad Rzeszutek
Whoops. I've attached an incorrect patch in the previous e-mail (http://lkml.org/lkml/2008/2/8/350) that didn't take in to account the 'reserve_bootmem' parameters changes. Here is fresher copy which has been tested on 2.6.24-git19 on a machine with iBFT and without. This patch (v0.4.7) adds

[PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread Konrad Rzeszutek
This patch (v0.4.7) adds /sysfs/firmware/ibft/[initiator|targetX|ethernetX] directories along with text properties which export the the iSCSI Boot Firmware Table (iBFT) structure. What is iSCSI Boot Firmware Table? It is a mechanism for the iSCSI tools to extract from the machine NICs the iSCSI

REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread Konrad Rzeszutek
Whoops. I've attached an incorrect patch in the previous e-mail (http://lkml.org/lkml/2008/2/8/350) that didn't take in to account the 'reserve_bootmem' parameters changes. Here is fresher copy which has been tested on 2.6.24-git19 on a machine with iBFT and without. This patch (v0.4.7) adds

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread James Bottomley
On Fri, 2008-02-08 at 23:10 -0400, Konrad Rzeszutek wrote: +/* + * Physical location of iSCSI Boot Format Table. This is now the Virtual address, isn't it? So just drop the Physical. + */ +unsigned long ibft_addr; +EXPORT_SYMBOL(ibft_addr); And since it is the virtual address, there's no

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread James Bottomley
On Fri, 2008-02-08 at 23:10 -0400, Konrad Rzeszutek wrote: + ibft_device = kmalloc(len, GFP_KERNEL); + if (!ibft_device) + return -ENOMEM; + + memcpy(ibft_device, hdr, len); This piece looks a bit odd. you're making ibft_device an exact duplicate of ibft_addr

Re: REPOST: [PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread James Bottomley
On Fri, 2008-02-08 at 23:10 -0400, Konrad Rzeszutek wrote: + if (hdr-id == id_nic) { + pci_dev = pci_get_bus_and_slot((nic-pci_bdf 0xff00) 8, + (nic-pci_bdf 0xff)); + if (pci_dev) { + rc =

[PATCH] Add iSCSI iBFT support (v0.4.7)

2008-02-08 Thread Konrad Rzeszutek
This patch (v0.4.7) adds /sysfs/firmware/ibft/[initiator|targetX|ethernetX] directories along with text properties which export the the iSCSI Boot Firmware Table (iBFT) structure. What is iSCSI Boot Firmware Table? It is a mechanism for the iSCSI tools to extract from the machine NICs the iSCSI