Skip to content

Instantly share code, notes, and snippets.

@sumikawa
Created January 29, 2017 08:42
Show Gist options
  • Save sumikawa/58c8a258d06447a861c81a778d567a11 to your computer and use it in GitHub Desktop.
Save sumikawa/58c8a258d06447a861c81a778d567a11 to your computer and use it in GitHub Desktop.
Index: ata-all.c
===================================================================
RCS file: /cvsroot/kame/kame/freebsd4/sys/dev/ata/ata-all.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 ata-all.c
--- ata-all.c 2001/09/25 04:59:19 1.1.1.5
+++ ata-all.c 2001/12/24 05:59:59
@@ -256,17 +256,23 @@
case 0x71118086:
case 0x71998086:
+ case 0x84ca8086:
return "Intel PIIX4 ATA33 controller";
case 0x24218086:
return "Intel ICH0 ATA33 controller";
case 0x24118086:
+ case 0x76018086:
return "Intel ICH ATA66 controller";
case 0x244a8086:
case 0x244b8086:
return "Intel ICH2 ATA100 controller";
+
+ case 0x248a8086:
+ case 0x248b8086:
+ return "Intel ICH3 ATA100 controller";
case 0x522910b9:
if (pci_get_revid(dev) < 0x20)
Index: ata-all.h
===================================================================
RCS file: /cvsroot/kame/kame/freebsd4/sys/dev/ata/ata-all.h,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 ata-all.h
--- ata-all.h 2001/04/23 13:09:56 1.1.1.4
+++ ata-all.h 2001/12/24 06:00:01
@@ -54,7 +54,7 @@
#define ATA_CYL_LSB 0x04 /* cylinder# LSB */
#define ATA_CYL_MSB 0x05 /* cylinder# MSB */
#define ATA_DRIVE 0x06 /* Sector/Drive/Head register */
-#define ATA_D_LBA 0x40 /* use LBA adressing */
+#define ATA_D_LBA 0x40 /* use LBA addressing */
#define ATA_D_IBM 0xa0 /* 512 byte sectors, ECC */
#define ATA_CMD 0x07 /* command register */
@@ -63,7 +63,15 @@
#define ATA_C_F_AUTOPOLL 0x01 /* start autopoll function */
#define ATA_C_ATAPI_RESET 0x08 /* reset ATAPI device */
#define ATA_C_READ 0x20 /* read command */
+#define ATA_C_READ48 0x24 /* read command */
+#define ATA_C_READ_DMA48 0x25 /* read w/DMA command */
+#define ATA_C_READ_DMA_QUEUED48 0x26 /* read w/DMS QUEUED command */
+#define ATA_C_READ_MUL48 0x29 /* read multi command */
#define ATA_C_WRITE 0x30 /* write command */
+#define ATA_C_WRITE48 0x34 /* write command */
+#define ATA_C_WRITE_DMA48 0x35 /* write w/DMA command */
+#define ATA_C_WRITE_DMA_QUEUED48 0x36 /* write w/DMA QUEUED command */
+#define ATA_C_WRITE_MUL48 0x39 /* write multi command */
#define ATA_C_PACKET_CMD 0xa0 /* packet command */
#define ATA_C_ATAPI_IDENTIFY 0xa1 /* get ATAPI params*/
#define ATA_C_SERVICE 0xa2 /* service command */
@@ -74,7 +82,9 @@
#define ATA_C_READ_DMA 0xc8 /* read w/DMA command */
#define ATA_C_WRITE_DMA 0xca /* write w/DMA command */
#define ATA_C_WRITE_DMA_QUEUED 0xcc /* write w/DMA QUEUED command */
+#define ATA_C_SLEEP 0xe6 /* sleep command */
#define ATA_C_FLUSHCACHE 0xe7 /* flush cache to disk */
+#define ATA_C_FLUSHCACHE48 0xea /* flush cache to disk */
#define ATA_C_ATA_IDENTIFY 0xec /* get ATA params */
#define ATA_C_SETFEATURES 0xef /* features command */
#define ATA_C_F_SETXFER 0x03 /* set transfer mode */
Index: ata-disk.c
===================================================================
RCS file: /cvsroot/kame/kame/freebsd4/sys/dev/ata/ata-disk.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 ata-disk.c
--- ata-disk.c 2001/09/25 04:59:09 1.1.1.5
+++ ata-disk.c 2001/12/24 06:00:04
@@ -329,7 +329,7 @@
DELAY(20);
}
- if (dumpstatus(addr, (long)(count * DEV_BSIZE)) < 0)
+ if (dumpstatus(addr, (off_t)count * DEV_BSIZE) < 0)
return EINTR;
blkno += blkcnt * dumppages;
Index: ata-dma.c
===================================================================
RCS file: /cvsroot/kame/kame/freebsd4/sys/dev/ata/ata-dma.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 ata-dma.c
--- ata-dma.c 2001/09/25 04:59:11 1.1.1.5
+++ ata-dma.c 2001/12/24 06:00:15
@@ -111,6 +111,8 @@
switch (scp->chiptype) {
+ case 0x248a8086: /* Intel ICH3 mobile */
+ case 0x248b8086: /* Intel ICH3 */
case 0x244a8086: /* Intel ICH2 mobile */
case 0x244b8086: /* Intel ICH2 */
if (udmamode >= 5) {
@@ -143,6 +145,7 @@
/* FALLTHROUGH */
case 0x24118086: /* Intel ICH */
+ case 0x76018086: /* Intel ICH */
if (udmamode >= 4) {
int32_t mask48, new48;
int16_t word54;
@@ -173,6 +176,7 @@
/* FALLTHROUGH */
case 0x71118086: /* Intel PIIX4 */
+ case 0x84CA8086: /* Intel PIIX4 */
case 0x71998086: /* Intel PIIX4e */
case 0x24218086: /* Intel ICH0 */
if (udmamode >= 2) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment