mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
[SCSI] megaraid_old: fix READ_CAPACITY
The bulk transfer mode got eleminated by
3f6270ef76
. Unfortunately, this mode is
required for READ_CAPACITY commands on certain cards, so put it back
again. This fixes a boot failure regression reported by Burton
Windle.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
804b3f9a16
commit
d5e89385e9
1 changed files with 8 additions and 0 deletions
|
@ -1753,6 +1753,14 @@ mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len)
|
||||||
|
|
||||||
*len = 0;
|
*len = 0;
|
||||||
|
|
||||||
|
if (scsi_sg_count(cmd) == 1 && !adapter->has_64bit_addr) {
|
||||||
|
sg = scsi_sglist(cmd);
|
||||||
|
scb->dma_h_bulkdata = sg_dma_address(sg);
|
||||||
|
*buf = (u32)scb->dma_h_bulkdata;
|
||||||
|
*len = sg_dma_len(sg);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
scsi_for_each_sg(cmd, sg, sgcnt, idx) {
|
scsi_for_each_sg(cmd, sg, sgcnt, idx) {
|
||||||
if (adapter->has_64bit_addr) {
|
if (adapter->has_64bit_addr) {
|
||||||
scb->sgl64[idx].address = sg_dma_address(sg);
|
scb->sgl64[idx].address = sg_dma_address(sg);
|
||||||
|
|
Loading…
Reference in a new issue