megaraid.c (39fe5434cb9de5da40510028b17b96bc4eb312b3) | megaraid.c (d5e89385e92a77b2764d9eb8284808a7628cb2a8) |
---|---|
1/* 2 * 3 * Linux MegaRAID device driver 4 * 5 * Copyright (c) 2002 LSI Logic Corporation. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 1739 unchanged lines hidden (view full) --- 1748 sgcnt = scsi_dma_map(cmd); 1749 1750 scb->dma_type = MEGA_SGLIST; 1751 1752 BUG_ON(sgcnt > adapter->sglen || sgcnt < 0); 1753 1754 *len = 0; 1755 | 1/* 2 * 3 * Linux MegaRAID device driver 4 * 5 * Copyright (c) 2002 LSI Logic Corporation. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 1739 unchanged lines hidden (view full) --- 1748 sgcnt = scsi_dma_map(cmd); 1749 1750 scb->dma_type = MEGA_SGLIST; 1751 1752 BUG_ON(sgcnt > adapter->sglen || sgcnt < 0); 1753 1754 *len = 0; 1755 |
1756 if (scsi_sg_count(cmd) == 1 && !adapter->has_64bit_addr) { 1757 sg = scsi_sglist(cmd); 1758 scb->dma_h_bulkdata = sg_dma_address(sg); 1759 *buf = (u32)scb->dma_h_bulkdata; 1760 *len = sg_dma_len(sg); 1761 return 0; 1762 } 1763 |
|
1756 scsi_for_each_sg(cmd, sg, sgcnt, idx) { 1757 if (adapter->has_64bit_addr) { 1758 scb->sgl64[idx].address = sg_dma_address(sg); 1759 *len += scb->sgl64[idx].length = sg_dma_len(sg); 1760 } else { 1761 scb->sgl[idx].address = sg_dma_address(sg); 1762 *len += scb->sgl[idx].length = sg_dma_len(sg); 1763 } --- 3277 unchanged lines hidden --- | 1764 scsi_for_each_sg(cmd, sg, sgcnt, idx) { 1765 if (adapter->has_64bit_addr) { 1766 scb->sgl64[idx].address = sg_dma_address(sg); 1767 *len += scb->sgl64[idx].length = sg_dma_len(sg); 1768 } else { 1769 scb->sgl[idx].address = sg_dma_address(sg); 1770 *len += scb->sgl[idx].length = sg_dma_len(sg); 1771 } --- 3277 unchanged lines hidden --- |