Date: Wed, 4 Nov 2009 16:16:50 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198904 - head/sys/cam/ata Message-ID: <200911041616.nA4GGo1B037970@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Nov 4 16:16:50 2009 New Revision: 198904 URL: http://svn.freebsd.org/changeset/base/198904 Log: PMP commands use short format. PMP write doesn't return result. Modified: head/sys/cam/ata/ata_all.c Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Wed Nov 4 16:05:18 2009 (r198903) +++ head/sys/cam/ata/ata_all.c Wed Nov 4 16:16:50 2009 (r198904) @@ -368,30 +368,24 @@ void ata_pm_read_cmd(struct ccb_ataio *ataio, int reg, int port) { bzero(&ataio->cmd, sizeof(ataio->cmd)); - ataio->cmd.flags = CAM_ATAIO_48BIT | CAM_ATAIO_NEEDRESULT; + ataio->cmd.flags = CAM_ATAIO_NEEDRESULT; ataio->cmd.command = ATA_READ_PM; ataio->cmd.features = reg; - ataio->cmd.features_exp = reg >> 8; ataio->cmd.device = port & 0x0f; } void -ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint64_t val) +ata_pm_write_cmd(struct ccb_ataio *ataio, int reg, int port, uint32_t val) { bzero(&ataio->cmd, sizeof(ataio->cmd)); - ataio->cmd.flags = CAM_ATAIO_48BIT | CAM_ATAIO_NEEDRESULT; + ataio->cmd.flags = 0; ataio->cmd.command = ATA_WRITE_PM; ataio->cmd.features = reg; + ataio->cmd.sector_count = val; ataio->cmd.lba_low = val >> 8; ataio->cmd.lba_mid = val >> 16; ataio->cmd.lba_high = val >> 24; ataio->cmd.device = port & 0x0f; - ataio->cmd.lba_low_exp = val >> 40; - ataio->cmd.lba_mid_exp = val >> 48; - ataio->cmd.lba_high_exp = val >> 56; - ataio->cmd.features_exp = reg >> 8; - ataio->cmd.sector_count = val; - ataio->cmd.sector_count_exp = val >> 32; } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911041616.nA4GGo1B037970>