Subject: ata bus speed
To: None <tech-kern@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 08/02/2004 00:17:35
--envbJBWh7q8WU6mo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,
I'd like to add IOCTLs to retrieve and set the speed status of an ATA device.
I have data defined for PATA and SATA, should I also add something for USB
(or others) ? If so, what ?

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--

--envbJBWh7q8WU6mo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ataio.h"

struct atabusiosp_args {
	int type;      /* bus type (PATA, SATA, ...)
#define ATABUSIOSP_TYPE_PATA 0x00
#define ATABUSIOSP_TYPE_SATA 0x01
	union {
		struct _pata {
			/*
			 * current/wanted speed,
			 * -1 = not known/supported
			 */
			int pio_level;
			int dma_level;
			int udma_level;
		} pata;
		struct _sata {
			uint32_t sstatus; /* the sstatus register */
		} sata;
	} speed;
};

#define ATABUSIOGETSP	_IOR('A', 3, struct atabusiosp_args);
#define ATABUSIOSETSP	_IOR('A', 4, struct atabusiosp_args);

--envbJBWh7q8WU6mo--