sata_sil24.c (4e73e0eb633f8a1b5cbf20e7f42c6dbfec1d1ca7) | sata_sil24.c (4f1a0ee11d6f9c104c8e6a13dae995709a6922a8) |
---|---|
1/* 2 * sata_sil24.c - Driver for Silicon Image 3124/3132 SATA-2 controllers 3 * 4 * Copyright 2005 Tejun Heo 5 * 6 * Based on preview driver from Silicon Image. 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 832 unchanged lines hidden (view full) --- 841 struct sil24_sge *sge; 842 u16 ctrl = 0; 843 844 cb = &pp->cmd_block[sil24_tag(qc->tag)]; 845 846 if (!ata_is_atapi(qc->tf.protocol)) { 847 prb = &cb->ata.prb; 848 sge = cb->ata.sge; | 1/* 2 * sata_sil24.c - Driver for Silicon Image 3124/3132 SATA-2 controllers 3 * 4 * Copyright 2005 Tejun Heo 5 * 6 * Based on preview driver from Silicon Image. 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 832 unchanged lines hidden (view full) --- 841 struct sil24_sge *sge; 842 u16 ctrl = 0; 843 844 cb = &pp->cmd_block[sil24_tag(qc->tag)]; 845 846 if (!ata_is_atapi(qc->tf.protocol)) { 847 prb = &cb->ata.prb; 848 sge = cb->ata.sge; |
849 if (ata_is_data(qc->tf.protocol)) { 850 u16 prot = 0; 851 ctrl = PRB_CTRL_PROTOCOL; 852 if (ata_is_ncq(qc->tf.protocol)) 853 prot |= PRB_PROT_NCQ; 854 if (qc->tf.flags & ATA_TFLAG_WRITE) 855 prot |= PRB_PROT_WRITE; 856 else 857 prot |= PRB_PROT_READ; 858 prb->prot = cpu_to_le16(prot); 859 } |
|
849 } else { 850 prb = &cb->atapi.prb; 851 sge = cb->atapi.sge; 852 memset(cb->atapi.cdb, 0, 32); 853 memcpy(cb->atapi.cdb, qc->cdb, qc->dev->cdb_len); 854 855 if (ata_is_data(qc->tf.protocol)) { 856 if (qc->tf.flags & ATA_TFLAG_WRITE) --- 525 unchanged lines hidden --- | 860 } else { 861 prb = &cb->atapi.prb; 862 sge = cb->atapi.sge; 863 memset(cb->atapi.cdb, 0, 32); 864 memcpy(cb->atapi.cdb, qc->cdb, qc->dev->cdb_len); 865 866 if (ata_is_data(qc->tf.protocol)) { 867 if (qc->tf.flags & ATA_TFLAG_WRITE) --- 525 unchanged lines hidden --- |