Re: [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Robert Hancock
Date: Monday, November 12, 2007 - 9:26 pm

Tejun Heo wrote:

Could be done.. but, I don't want to constrain the ADMA APRD/CPB area in 
that way (there are some dual-socket Opteron boxes with this controller, 
forcing an allocation below 4GB for this could force a non-optimal node 
allocation I think..) To do this I'd have to raise the mask for the APRD 
allocation, drop it again, then raise it again in ADMA mode, which is 
kind of ugly.

Also, I'd rather not allocate the legacy PRD at all if we're in ADMA 
mode. That way, if some bug causes us to try and do legacy DMA in ADMA 
mode, we'll crash from null pointer dereference instead of potentially 
transferring incorrect data (as we had in this case) and corrupting things.


Yes, it should likely do something with these return values. Though 
theoretically it shouldn't fail, since the DMA mask is either 32-bit, 
which shouldn't fail, or one that was successfully set before. Also I 
don't think the SCSI layer actually checks the slave_config return 
value.. sigh.


Could do. That change would have to come first though, as the change to 
not allocate the PRD except when necessary would cause some cases there 
to blow up when before they might have worked in some cases.

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

Messages in current thread:
Re: [PATCH] sata_nv: fix ADMA ATAPI issues with memory ove ..., Robert Hancock, (Mon Nov 12, 9:26 pm)