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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: James Bottomley
Date: Friday, February 1, 2008 - 5:18 pm

On Wed, 2008-01-30 at 17:37 -0400, Konrad Rzeszutek wrote:

Some pieces of the patch are obviously wrong:  find_ibft() shouldn't be
in ibft_init ... if ibft_phys was zero, it means the bootmem reservation
wasn't done and you shouldn't be poking about in memory which has likely
now been overwritten.

Also, why is ibft_phys the global variable you pass?  You never actually
want to use the physical address, what you always end up using is the
kernel virtual address.

I'd simply use the ibft variable to point to the virtual address of the
ibft or null if not found, then you can throw out all the phys_to_virt()
calls.

Also, move the reserve_bootmem into the ibft_find routines and ensure
they're only called once on boot.  Refuse to attach the ibft driver if
the virtual pointer ibft is null.

James


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Add iSCSI iBFT support (v0.4.6), Konrad Rzeszutek, (Wed Jan 30, 2:37 pm)
Re: [PATCH] Add iSCSI iBFT support (v0.4.6), James Bottomley, (Fri Feb 1, 5:18 pm)
Re: [PATCH] Add iSCSI iBFT support (v0.4.6), Andrew Morton, (Fri Feb 1, 5:44 pm)
Re: [PATCH] Add iSCSI iBFT support (v0.4.6), Konrad Rzeszutek, (Fri Feb 8, 1:37 pm)