Hi Dan, tf->nsect can not be calculated from user space: the tag must be calculated by the driver. Gwendal. On Tue, May 19, 2009 at 11:11 AM, Dan Porat <dan.porat@xxxxxxxxx> wrote: > As I have seen sg_io does not support NCQ in ATA passthrough. > will changing the mapping function libata-scsi.c (line 2745) , work? > > If not , how else can I check the protocol (FPDMA) ? > static u8 > 2725ata_scsi_map_proto(u8 byte1) > 2726{ > 2727 switch((byte1 & 0x1e) >> 1) { > 2728 case 3: /* Non-data */ > 2729 return ATA_PROT_NODATA; > 2730 > 2731 case 6: /* DMA */ > 2732 case 10: /* UDMA Data-in */ > 2733 case 11: /* UDMA Data-Out */ > 2734 return ATA_PROT_DMA; > 2735 > 2736 case 4: /* PIO Data-in */ > 2737 case 5: /* PIO Data-out */ > 2738 return ATA_PROT_PIO; > 2739 > 2745 case 12: /* FPDMA */ > return ATA_PROT_NCQ > 2740 case 0: /* Hard Reset */ > 2741 case 1: /* SRST */ > 2742 case 8: /* Device Diagnostic */ > 2743 case 9: /* Device Reset */ > 2744 case 7: /* DMA Queued */ > > 2746 case 15: /* Return Response Info */ > 2747 default: /* Reserved */ > 2748 break; > 2749 } > 2750 > 2751 return ATA_PROT_UNKNOWN; > 2752} > > > > Thanks > > Dan Porat > -- > To unsubscribe from this list: send the line "unsubscribe linux-ide" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html