patch-2.4.3 linux/drivers/scsi/aic7xxx/aic7xxx_seq.h

Next file: linux/drivers/scsi/aic7xxx/aicasm/Makefile
Previous file: linux/drivers/scsi/aic7xxx/aic7xxx_reg.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.2/linux/drivers/scsi/aic7xxx/aic7xxx_seq.h linux/drivers/scsi/aic7xxx/aic7xxx_seq.h
@@ -0,0 +1,1239 @@
+/*
+  * DO NOT EDIT - This file is automatically generated.
+  */
+static uint8_t seqprog[] = {
+	0xb2, 0x00, 0x00, 0x08,
+	0xf7, 0x11, 0x22, 0x08,
+	0x00, 0x65, 0xde, 0x59,
+	0xf7, 0x01, 0x02, 0x08,
+	0xff, 0x6a, 0x24, 0x08,
+	0x40, 0x00, 0x40, 0x68,
+	0x08, 0x1f, 0x3e, 0x10,
+	0x40, 0x00, 0x40, 0x68,
+	0xff, 0x40, 0x3c, 0x60,
+	0x08, 0x1f, 0x3e, 0x10,
+	0x60, 0x0b, 0x42, 0x68,
+	0x40, 0xfa, 0x12, 0x78,
+	0x01, 0x4d, 0xc8, 0x30,
+	0x00, 0x4c, 0x12, 0x70,
+	0x01, 0x39, 0xa2, 0x30,
+	0x00, 0x6a, 0x7e, 0x5e,
+	0x01, 0x51, 0x20, 0x31,
+	0x01, 0x59, 0xb2, 0x00,
+	0x0d, 0x6a, 0x76, 0x00,
+	0x00, 0x51, 0xda, 0x5d,
+	0x01, 0x51, 0xc8, 0x30,
+	0x00, 0x39, 0xde, 0x60,
+	0x00, 0xbb, 0x30, 0x70,
+	0xc1, 0x6a, 0x96, 0x5e,
+	0x01, 0xbf, 0x72, 0x30,
+	0x01, 0x40, 0x7e, 0x31,
+	0x01, 0x90, 0x80, 0x30,
+	0x01, 0xf6, 0xd4, 0x30,
+	0x01, 0x4d, 0x9a, 0x18,
+	0xfe, 0x59, 0xb2, 0x08,
+	0x01, 0x40, 0x20, 0x31,
+	0x00, 0x65, 0xe2, 0x58,
+	0x60, 0x0b, 0x40, 0x78,
+	0x08, 0x6a, 0x18, 0x00,
+	0x08, 0x11, 0x22, 0x00,
+	0x60, 0x0b, 0x00, 0x78,
+	0x40, 0x0b, 0x12, 0x69,
+	0x80, 0x0b, 0xcc, 0x78,
+	0x20, 0x6a, 0x16, 0x00,
+	0x20, 0x11, 0x54, 0x68,
+	0x20, 0x6a, 0x18, 0x00,
+	0x20, 0x11, 0x22, 0x00,
+	0xa4, 0x6a, 0x06, 0x00,
+	0x08, 0x3c, 0x78, 0x00,
+	0x01, 0x50, 0xc8, 0x30,
+	0xe0, 0x6a, 0xcc, 0x00,
+	0x48, 0x6a, 0xc4, 0x5d,
+	0x01, 0x6a, 0xdc, 0x01,
+	0x88, 0x6a, 0xcc, 0x00,
+	0x48, 0x6a, 0xc4, 0x5d,
+	0x01, 0x6a, 0x26, 0x01,
+	0xf0, 0x19, 0x7a, 0x08,
+	0x0f, 0x18, 0xc8, 0x08,
+	0x0f, 0x0f, 0xc8, 0x08,
+	0x0f, 0x05, 0xc8, 0x08,
+	0x00, 0x3d, 0x7a, 0x00,
+	0x08, 0x1f, 0x74, 0x78,
+	0x80, 0x3d, 0x7a, 0x00,
+	0x01, 0x3d, 0xd8, 0x31,
+	0x01, 0x3d, 0x32, 0x31,
+	0x10, 0x03, 0x56, 0x79,
+	0x00, 0x65, 0x0a, 0x59,
+	0x80, 0x66, 0xa8, 0x78,
+	0x01, 0x66, 0xd8, 0x31,
+	0x01, 0x66, 0x32, 0x31,
+	0x40, 0x66, 0x86, 0x68,
+	0x01, 0x3c, 0x78, 0x00,
+	0x10, 0x03, 0xb0, 0x78,
+	0x00, 0x65, 0x0a, 0x59,
+	0xe0, 0x66, 0xc8, 0x18,
+	0x00, 0x65, 0xb0, 0x50,
+	0xdd, 0x66, 0xc8, 0x18,
+	0x00, 0x65, 0xb0, 0x48,
+	0x01, 0x66, 0xd8, 0x31,
+	0x01, 0x66, 0x32, 0x31,
+	0x10, 0x03, 0x56, 0x79,
+	0x00, 0x65, 0x0a, 0x59,
+	0x01, 0x66, 0xd8, 0x31,
+	0x01, 0x66, 0x32, 0x31,
+	0x01, 0x66, 0xb0, 0x30,
+	0x40, 0x3c, 0x78, 0x00,
+	0x10, 0x03, 0xa6, 0x78,
+	0x00, 0x65, 0x0a, 0x59,
+	0x00, 0x65, 0xb0, 0x40,
+	0x61, 0x6a, 0x96, 0x5e,
+	0x08, 0x51, 0x2e, 0x71,
+	0x02, 0x0b, 0xac, 0x78,
+	0x00, 0x65, 0xa8, 0x40,
+	0x80, 0x86, 0xc8, 0x08,
+	0x01, 0x4f, 0xc8, 0x30,
+	0x00, 0x50, 0xc2, 0x60,
+	0xc4, 0x6a, 0x32, 0x5d,
+	0x40, 0x3c, 0xbe, 0x78,
+	0x28, 0x6a, 0x48, 0x5d,
+	0x00, 0x65, 0x54, 0x41,
+	0x08, 0x6a, 0x48, 0x5d,
+	0x00, 0x65, 0x54, 0x41,
+	0xff, 0x6a, 0xd8, 0x01,
+	0xff, 0x6a, 0x32, 0x01,
+	0x90, 0x3c, 0x78, 0x00,
+	0x10, 0x03, 0x4a, 0x69,
+	0x00, 0x65, 0x2e, 0x41,
+	0x1a, 0x01, 0x02, 0x00,
+	0xf0, 0x19, 0x7a, 0x08,
+	0x0f, 0x0f, 0xc8, 0x08,
+	0x0f, 0x05, 0xc8, 0x08,
+	0x00, 0x3d, 0x7a, 0x00,
+	0x08, 0x1f, 0xda, 0x78,
+	0x80, 0x3d, 0x7a, 0x00,
+	0x20, 0x6a, 0x16, 0x00,
+	0x00, 0x65, 0xbe, 0x41,
+	0x00, 0x65, 0x76, 0x5e,
+	0x00, 0x65, 0x12, 0x40,
+	0x20, 0x11, 0xe8, 0x68,
+	0x20, 0x6a, 0x18, 0x00,
+	0x20, 0x11, 0x22, 0x00,
+	0xf7, 0x1f, 0xca, 0x08,
+	0x80, 0xb9, 0xee, 0x78,
+	0x08, 0x65, 0xca, 0x00,
+	0x01, 0x65, 0x3e, 0x30,
+	0x01, 0xb9, 0x1e, 0x30,
+	0x7f, 0xb9, 0x0a, 0x08,
+	0x01, 0xb9, 0x0a, 0x30,
+	0x01, 0x56, 0xca, 0x30,
+	0x80, 0xb8, 0xfc, 0x78,
+	0x80, 0x65, 0xca, 0x00,
+	0x01, 0x65, 0x00, 0x34,
+	0x01, 0x56, 0x00, 0x34,
+	0x1a, 0x01, 0x02, 0x00,
+	0x08, 0xb8, 0x06, 0x79,
+	0x20, 0x01, 0x02, 0x00,
+	0x02, 0xbd, 0x08, 0x34,
+	0x01, 0xbd, 0x08, 0x34,
+	0x08, 0x01, 0x02, 0x00,
+	0x02, 0x0b, 0x0c, 0x79,
+	0xf7, 0x01, 0x02, 0x08,
+	0x01, 0x06, 0xcc, 0x34,
+	0xb2, 0x00, 0x00, 0x08,
+	0x40, 0x6a, 0x16, 0x00,
+	0x01, 0x40, 0x20, 0x31,
+	0x01, 0xbf, 0x80, 0x30,
+	0x01, 0xb9, 0x7a, 0x30,
+	0x01, 0xba, 0x7c, 0x30,
+	0x00, 0x65, 0x00, 0x59,
+	0x80, 0x0b, 0xba, 0x79,
+	0xe4, 0x6a, 0x32, 0x5d,
+	0x80, 0xba, 0x48, 0x5d,
+	0x20, 0xb8, 0x2c, 0x79,
+	0x20, 0x6a, 0x48, 0x5d,
+	0x00, 0xa3, 0x48, 0x5d,
+	0x01, 0xa0, 0x78, 0x30,
+	0x10, 0x03, 0x46, 0x69,
+	0x08, 0x3c, 0x62, 0x69,
+	0x04, 0x3c, 0x88, 0x69,
+	0x02, 0x3c, 0x8e, 0x69,
+	0x01, 0x3c, 0x4c, 0x79,
+	0x00, 0x6a, 0x7e, 0x5e,
+	0x01, 0x6a, 0xa2, 0x30,
+	0x00, 0x65, 0x9a, 0x59,
+	0x04, 0x51, 0x3e, 0x61,
+	0x0d, 0x6a, 0x76, 0x00,
+	0x00, 0xbb, 0xda, 0x5d,
+	0x00, 0x65, 0x2c, 0x41,
+	0xa4, 0x6a, 0x06, 0x00,
+	0x00, 0x65, 0x0a, 0x59,
+	0x00, 0x65, 0xa8, 0x40,
+	0xe4, 0x6a, 0x32, 0x5d,
+	0x20, 0x3c, 0x52, 0x79,
+	0x02, 0x6a, 0x48, 0x5d,
+	0x04, 0x6a, 0x48, 0x5d,
+	0x01, 0x03, 0x54, 0x69,
+	0xf7, 0x11, 0x22, 0x08,
+	0xff, 0x6a, 0x24, 0x08,
+	0xff, 0x6a, 0x06, 0x08,
+	0x01, 0x6a, 0x7e, 0x00,
+	0x00, 0x65, 0x9a, 0x59,
+	0x00, 0x65, 0x04, 0x40,
+	0x84, 0x6a, 0x32, 0x5d,
+	0x00, 0x65, 0x0a, 0x59,
+	0x01, 0x66, 0xc8, 0x30,
+	0x01, 0x64, 0xd8, 0x31,
+	0x01, 0x64, 0x32, 0x31,
+	0x5b, 0x64, 0xc8, 0x28,
+	0x30, 0x64, 0xca, 0x18,
+	0x01, 0x6c, 0xc8, 0x30,
+	0xff, 0x64, 0x84, 0x79,
+	0x08, 0x01, 0x02, 0x00,
+	0x02, 0x0b, 0x76, 0x79,
+	0x01, 0x64, 0x7c, 0x61,
+	0xf7, 0x01, 0x02, 0x08,
+	0x01, 0x06, 0xd8, 0x31,
+	0x01, 0x06, 0x32, 0x31,
+	0xff, 0x64, 0xc8, 0x18,
+	0xff, 0x64, 0x76, 0x69,
+	0xf7, 0x3c, 0x78, 0x08,
+	0x00, 0x65, 0x2e, 0x41,
+	0x40, 0xa1, 0x7e, 0x10,
+	0x04, 0xa1, 0x32, 0x5d,
+	0x00, 0x65, 0x62, 0x42,
+	0xc4, 0x6a, 0x32, 0x5d,
+	0xc0, 0x6a, 0x7e, 0x00,
+	0x00, 0xa2, 0x48, 0x5d,
+	0xe4, 0x6a, 0x06, 0x00,
+	0x00, 0x6a, 0x48, 0x5d,
+	0x00, 0x65, 0x54, 0x41,
+	0x10, 0x3c, 0x9e, 0x69,
+	0x00, 0xbb, 0x64, 0x44,
+	0x18, 0x6a, 0xda, 0x01,
+	0x01, 0x69, 0xd8, 0x31,
+	0x1c, 0x6a, 0xd0, 0x01,
+	0x09, 0xee, 0xdc, 0x01,
+	0x80, 0xee, 0xa6, 0x79,
+	0xff, 0x6a, 0xdc, 0x09,
+	0x01, 0x93, 0x26, 0x01,
+	0x03, 0x6a, 0x2a, 0x01,
+	0x01, 0x69, 0x32, 0x31,
+	0x1c, 0x6a, 0xa8, 0x5d,
+	0x0a, 0x93, 0x26, 0x01,
+	0x00, 0x65, 0x6c, 0x5e,
+	0x01, 0x50, 0xa0, 0x18,
+	0x02, 0x6a, 0x22, 0x05,
+	0x80, 0x6a, 0x74, 0x00,
+	0x80, 0x3c, 0x78, 0x00,
+	0x00, 0x65, 0xa0, 0x5d,
+	0x01, 0x3f, 0xc8, 0x30,
+	0xbf, 0x64, 0x62, 0x7a,
+	0x80, 0x64, 0x82, 0x73,
+	0xa0, 0x64, 0xd8, 0x73,
+	0xc0, 0x64, 0xd0, 0x73,
+	0xe0, 0x64, 0x18, 0x74,
+	0x01, 0x6a, 0x96, 0x5e,
+	0x00, 0x65, 0xbe, 0x41,
+	0xf7, 0x11, 0x22, 0x08,
+	0x01, 0x06, 0xd4, 0x30,
+	0xff, 0x6a, 0x24, 0x08,
+	0xf7, 0x01, 0x02, 0x08,
+	0x09, 0x0c, 0xd8, 0x79,
+	0x08, 0x0c, 0x04, 0x68,
+	0xb1, 0x6a, 0x96, 0x5e,
+	0xff, 0x6a, 0x26, 0x09,
+	0x12, 0x01, 0x02, 0x00,
+	0x02, 0x6a, 0x08, 0x30,
+	0xff, 0x6a, 0x08, 0x08,
+	0xdf, 0x01, 0x02, 0x08,
+	0x01, 0x6a, 0x7e, 0x00,
+	0xff, 0x6a, 0x78, 0x0c,
+	0xff, 0x6a, 0xc8, 0x08,
+	0x08, 0xa4, 0x48, 0x19,
+	0x00, 0xa5, 0x4a, 0x21,
+	0x00, 0xa6, 0x4c, 0x21,
+	0x00, 0xa7, 0x4e, 0x25,
+	0x08, 0xeb, 0x9a, 0x7e,
+	0x80, 0xeb, 0xf8, 0x79,
+	0xff, 0x6a, 0xd6, 0x09,
+	0x08, 0xeb, 0xfc, 0x69,
+	0xff, 0x6a, 0xd4, 0x0c,
+	0x88, 0xeb, 0x12, 0x72,
+	0x08, 0xeb, 0x9a, 0x6e,
+	0x80, 0xa3, 0x9a, 0x6e,
+	0x04, 0xea, 0x16, 0xe2,
+	0x08, 0xee, 0x9a, 0x6e,
+	0x04, 0x6a, 0xd0, 0x81,
+	0x05, 0xa4, 0xc0, 0x89,
+	0x03, 0xa5, 0xc2, 0x31,
+	0x09, 0x6a, 0xd6, 0x05,
+	0x00, 0x65, 0xfa, 0x59,
+	0x06, 0xa4, 0xd4, 0x89,
+	0x80, 0x94, 0x9a, 0x7e,
+	0x04, 0xe9, 0x10, 0x31,
+	0x01, 0xe9, 0xca, 0x30,
+	0x01, 0x65, 0x20, 0x7a,
+	0x01, 0x57, 0xae, 0x10,
+	0x01, 0x65, 0x18, 0x31,
+	0x02, 0xe9, 0x1a, 0x31,
+	0x01, 0xe9, 0x46, 0x31,
+	0x00, 0x65, 0xec, 0x59,
+	0x01, 0xa4, 0xca, 0x30,
+	0x01, 0x57, 0x2e, 0x7a,
+	0x04, 0x65, 0xca, 0x00,
+	0x80, 0xa3, 0x32, 0x7a,
+	0x02, 0x65, 0xca, 0x00,
+	0x01, 0x65, 0xf8, 0x31,
+	0x01, 0x3b, 0x26, 0x31,
+	0xff, 0x6a, 0xd4, 0x0c,
+	0x01, 0x8c, 0xc8, 0x30,
+	0x00, 0x88, 0xc8, 0x18,
+	0x02, 0x64, 0xc8, 0x88,
+	0xff, 0x64, 0x9a, 0x7e,
+	0xff, 0x8d, 0x48, 0x6a,
+	0xff, 0x8e, 0x48, 0x6a,
+	0x03, 0x8c, 0xd4, 0x98,
+	0x00, 0x65, 0x9a, 0x56,
+	0x01, 0x64, 0x70, 0x30,
+	0xff, 0x64, 0xc8, 0x10,
+	0x01, 0x64, 0xc8, 0x18,
+	0x00, 0x8c, 0x18, 0x19,
+	0xff, 0x8d, 0x1a, 0x21,
+	0xff, 0x8e, 0x1c, 0x25,
+	0x04, 0x14, 0x10, 0x31,
+	0x03, 0xa0, 0x18, 0x31,
+	0x03, 0xa0, 0x10, 0x30,
+	0x08, 0x6a, 0xcc, 0x00,
+	0xa0, 0x6a, 0xbe, 0x5d,
+	0x01, 0xa0, 0xae, 0x08,
+	0x00, 0x65, 0x88, 0x42,
+	0xa8, 0x6a, 0x76, 0x00,
+	0x79, 0x6a, 0x76, 0x00,
+	0x40, 0x3f, 0x6a, 0x6a,
+	0x04, 0x3b, 0x76, 0x00,
+	0x00, 0x65, 0x52, 0x5d,
+	0x04, 0x6a, 0xd4, 0x81,
+	0x20, 0x3c, 0x54, 0x6a,
+	0x20, 0x3c, 0x78, 0x00,
+	0x07, 0xac, 0x10, 0x31,
+	0x05, 0xb3, 0x46, 0x31,
+	0x88, 0x6a, 0xcc, 0x00,
+	0xac, 0x6a, 0xb6, 0x5d,
+	0xa3, 0x6a, 0xcc, 0x00,
+	0xb3, 0x6a, 0xba, 0x5d,
+	0x00, 0x65, 0x38, 0x5a,
+	0xfd, 0xa4, 0x48, 0x09,
+	0x01, 0x8c, 0xae, 0x08,
+	0x03, 0x8c, 0x10, 0x30,
+	0x00, 0x65, 0xae, 0x5d,
+	0x01, 0xa4, 0x98, 0x7a,
+	0x04, 0x3b, 0x76, 0x08,
+	0x01, 0x3b, 0x26, 0x31,
+	0x80, 0x02, 0x04, 0x00,
+	0x10, 0x0c, 0x90, 0x7a,
+	0x7f, 0x02, 0x04, 0x08,
+	0x91, 0x6a, 0x96, 0x5e,
+	0x00, 0x65, 0xbe, 0x41,
+	0x01, 0xa4, 0xca, 0x30,
+	0x80, 0xa3, 0x9e, 0x7a,
+	0x02, 0x65, 0xca, 0x00,
+	0x01, 0x57, 0xa2, 0x7a,
+	0x04, 0x65, 0xca, 0x00,
+	0x01, 0x65, 0xf8, 0x31,
+	0x01, 0x3b, 0x26, 0x31,
+	0x00, 0x65, 0x00, 0x5a,
+	0x01, 0xfc, 0xae, 0x6a,
+	0x80, 0x0b, 0xa6, 0x6a,
+	0x10, 0x0c, 0xa6, 0x7a,
+	0x04, 0x93, 0xc0, 0x6a,
+	0xdf, 0x93, 0x26, 0x09,
+	0x20, 0x93, 0xb2, 0x6a,
+	0x02, 0x93, 0x26, 0x01,
+	0x01, 0x94, 0xb4, 0x7a,
+	0x01, 0x94, 0xb4, 0x7a,
+	0x01, 0x94, 0xb4, 0x7a,
+	0x01, 0x94, 0xb4, 0x7a,
+	0x01, 0x94, 0xb4, 0x7a,
+	0x10, 0x94, 0xc0, 0x6a,
+	0xd7, 0x93, 0x26, 0x09,
+	0x08, 0x93, 0xc4, 0x6a,
+	0x02, 0xfc, 0xce, 0x7a,
+	0x01, 0xfc, 0x4e, 0x7b,
+	0x01, 0xa4, 0x48, 0x01,
+	0x00, 0x65, 0x4e, 0x43,
+	0x40, 0x0d, 0xd4, 0x6a,
+	0x00, 0x65, 0x00, 0x5a,
+	0x00, 0x65, 0xc6, 0x42,
+	0x80, 0xfc, 0xde, 0x7a,
+	0x80, 0xa4, 0xde, 0x6a,
+	0xff, 0xa5, 0x4a, 0x19,
+	0xff, 0xa6, 0x4c, 0x21,
+	0xff, 0xa7, 0x4e, 0x21,
+	0xf8, 0xfc, 0x48, 0x09,
+	0xff, 0x6a, 0xae, 0x08,
+	0x04, 0xfc, 0xe6, 0x7a,
+	0x01, 0x57, 0xae, 0x00,
+	0xff, 0x6a, 0x46, 0x09,
+	0xff, 0x38, 0xf2, 0x6a,
+	0x80, 0xa3, 0xf2, 0x7a,
+	0x80, 0x0b, 0xf0, 0x7a,
+	0x04, 0x3b, 0xf2, 0x7a,
+	0xbf, 0x3b, 0x76, 0x08,
+	0x01, 0x3b, 0x26, 0x31,
+	0x00, 0x65, 0x00, 0x5a,
+	0x01, 0x0b, 0x00, 0x6b,
+	0x10, 0x0c, 0xf4, 0x7a,
+	0x04, 0x93, 0xfe, 0x6a,
+	0x01, 0x94, 0xfc, 0x7a,
+	0x10, 0x94, 0xfe, 0x6a,
+	0xc7, 0x93, 0x26, 0x09,
+	0x01, 0x99, 0xd4, 0x30,
+	0x38, 0x93, 0x02, 0x6b,
+	0xff, 0x08, 0x4e, 0x6b,
+	0xff, 0x09, 0x4e, 0x6b,
+	0xff, 0x0a, 0x4e, 0x6b,
+	0xff, 0x38, 0x1e, 0x7b,
+	0x04, 0x14, 0x10, 0x31,
+	0x01, 0x38, 0x18, 0x31,
+	0x02, 0x6a, 0x1a, 0x31,
+	0x88, 0x6a, 0xcc, 0x00,
+	0x14, 0x6a, 0xbc, 0x5d,
+	0x00, 0x38, 0xa8, 0x5d,
+	0xff, 0x6a, 0x70, 0x08,
+	0x00, 0x65, 0x44, 0x43,
+	0x80, 0xa3, 0x24, 0x7b,
+	0x01, 0xa4, 0x48, 0x01,
+	0x00, 0x65, 0x4e, 0x43,
+	0x08, 0xeb, 0x2a, 0x7b,
+	0x00, 0x65, 0x00, 0x5a,
+	0x08, 0xeb, 0x26, 0x6b,
+	0x07, 0xe9, 0x10, 0x31,
+	0x80, 0xe9, 0x30, 0x7b,
+	0x80, 0xa3, 0x46, 0x01,
+	0x88, 0x6a, 0xcc, 0x00,
+	0xa4, 0x6a, 0xbc, 0x5d,
+	0x08, 0x6a, 0xa8, 0x5d,
+	0x0d, 0x93, 0x26, 0x01,
+	0x00, 0x65, 0x6c, 0x5e,
+	0x88, 0x6a, 0xcc, 0x00,
+	0x00, 0x65, 0x4e, 0x5e,
+	0x01, 0x99, 0x46, 0x31,
+	0x00, 0x65, 0x38, 0x5a,
+	0x00, 0x65, 0xec, 0x59,
+	0x03, 0x8c, 0x10, 0x30,
+	0x00, 0x65, 0xae, 0x5d,
+	0x01, 0x8c, 0x4c, 0x7b,
+	0x01, 0x57, 0xae, 0x10,
+	0x80, 0x0b, 0x88, 0x6a,
+	0x80, 0x0b, 0x54, 0x6b,
+	0x01, 0x0c, 0x50, 0x7b,
+	0x10, 0x0c, 0x88, 0x7a,
+	0x00, 0x65, 0xf6, 0x59,
+	0xff, 0x38, 0x66, 0x7b,
+	0x01, 0x38, 0xc8, 0x30,
+	0x00, 0x08, 0x40, 0x19,
+	0xff, 0x6a, 0xc8, 0x08,
+	0x00, 0x09, 0x42, 0x21,
+	0x00, 0x0a, 0x44, 0x21,
+	0xff, 0x6a, 0x70, 0x08,
+	0x00, 0x65, 0x68, 0x43,
+	0x03, 0x08, 0x40, 0x31,
+	0x03, 0x08, 0x40, 0x31,
+	0x01, 0x08, 0x40, 0x31,
+	0x01, 0x09, 0x42, 0x31,
+	0x01, 0x0a, 0x44, 0x31,
+	0xfd, 0xb4, 0x68, 0x09,
+	0x12, 0x01, 0x02, 0x00,
+	0x12, 0x01, 0x02, 0x00,
+	0x04, 0x3c, 0xbe, 0x79,
+	0xfb, 0x3c, 0x78, 0x08,
+	0x04, 0x93, 0x2e, 0x79,
+	0x01, 0x0c, 0x7c, 0x6b,
+	0x00, 0x65, 0x2e, 0x41,
+	0x00, 0x65, 0xbe, 0x41,
+	0x00, 0x65, 0x52, 0x5d,
+	0x01, 0xbc, 0x18, 0x31,
+	0x02, 0x6a, 0x1a, 0x31,
+	0x02, 0x6a, 0xf8, 0x01,
+	0x01, 0xbc, 0x10, 0x30,
+	0x02, 0x6a, 0x12, 0x30,
+	0x01, 0xbc, 0x10, 0x30,
+	0xff, 0x6a, 0x12, 0x08,
+	0xff, 0x6a, 0x14, 0x08,
+	0xf3, 0xbc, 0xd4, 0x18,
+	0xa0, 0x6a, 0xaa, 0x53,
+	0x04, 0xa0, 0x10, 0x31,
+	0xac, 0x6a, 0x26, 0x01,
+	0x04, 0xa0, 0x10, 0x31,
+	0x03, 0x08, 0x18, 0x31,
+	0x88, 0x6a, 0xcc, 0x00,
+	0xa0, 0x6a, 0xbc, 0x5d,
+	0x00, 0xbc, 0xa8, 0x5d,
+	0x3d, 0x6a, 0x26, 0x01,
+	0x00, 0x65, 0xc2, 0x43,
+	0xff, 0x6a, 0x10, 0x09,
+	0xa4, 0x6a, 0x26, 0x01,
+	0x0c, 0xa0, 0x32, 0x31,
+	0x05, 0x6a, 0x26, 0x01,
+	0x35, 0x6a, 0x26, 0x01,
+	0x0c, 0xa0, 0x32, 0x31,
+	0x36, 0x6a, 0x26, 0x01,
+	0x02, 0x93, 0x26, 0x01,
+	0x35, 0x6a, 0x26, 0x01,
+	0x00, 0x65, 0x60, 0x5e,
+	0x00, 0x65, 0x60, 0x5e,
+	0x02, 0x93, 0x26, 0x01,
+	0x04, 0x0b, 0xc6, 0x6b,
+	0x10, 0x0c, 0xc2, 0x7b,
+	0x01, 0x03, 0xc6, 0x6b,
+	0xc7, 0x93, 0x26, 0x09,
+	0x38, 0x93, 0xca, 0x6b,
+	0x10, 0x01, 0x02, 0x00,
+	0x00, 0x65, 0xbe, 0x41,
+	0x00, 0x65, 0x52, 0x5d,
+	0x01, 0x06, 0x50, 0x31,
+	0x00, 0x65, 0xbe, 0x41,
+	0x10, 0x3f, 0x06, 0x00,
+	0x01, 0x3a, 0xca, 0x30,
+	0x80, 0x65, 0x04, 0x64,
+	0x10, 0xb8, 0x28, 0x6c,
+	0x01, 0xb9, 0xdc, 0x30,
+	0x01, 0x6e, 0xc8, 0x30,
+	0x01, 0x54, 0xca, 0x30,
+	0x80, 0xb9, 0xe8, 0x7b,
+	0x01, 0x55, 0xca, 0x30,
+	0x80, 0xb9, 0xec, 0x7b,
+	0x01, 0x55, 0xca, 0x30,
+	0x00, 0x65, 0x28, 0x6c,
+	0xc0, 0xba, 0xca, 0x00,
+	0x40, 0xb8, 0xf4, 0x6b,
+	0xbf, 0x65, 0xca, 0x08,
+	0x20, 0xb8, 0x08, 0x7c,
+	0x01, 0x65, 0x0c, 0x30,
+	0x00, 0x65, 0xa0, 0x5d,
+	0xa0, 0x3f, 0x10, 0x64,
+	0x23, 0xb8, 0x0c, 0x08,
+	0x00, 0x65, 0xa0, 0x5d,
+	0xa0, 0x3f, 0x10, 0x64,
+	0x00, 0xbb, 0x08, 0x44,
+	0xff, 0x65, 0x08, 0x64,
+	0x00, 0x65, 0x28, 0x44,
+	0x40, 0x6a, 0x18, 0x00,
+	0x01, 0x65, 0x0c, 0x30,
+	0x00, 0x65, 0xa0, 0x5d,
+	0xa0, 0x3f, 0xd6, 0x73,
+	0x40, 0x6a, 0x18, 0x00,
+	0x01, 0x3a, 0xa6, 0x30,
+	0x08, 0x6a, 0x74, 0x00,
+	0x00, 0x65, 0xbe, 0x41,
+	0x64, 0x6a, 0x2c, 0x5d,
+	0x80, 0x64, 0x9e, 0x6c,
+	0x04, 0x64, 0x74, 0x74,
+	0x02, 0x64, 0x82, 0x74,
+	0x00, 0x6a, 0x44, 0x74,
+	0x03, 0x64, 0x90, 0x74,
+	0x23, 0x64, 0x30, 0x74,
+	0x08, 0x64, 0x40, 0x74,
+	0x61, 0x6a, 0x96, 0x5e,
+	0x00, 0x65, 0xa0, 0x5d,
+	0x08, 0x51, 0xc0, 0x71,
+	0x00, 0x65, 0x28, 0x44,
+	0x80, 0x04, 0x3e, 0x7c,
+	0x51, 0x6a, 0x22, 0x5d,
+	0x01, 0x51, 0x3e, 0x64,
+	0x01, 0xa4, 0x3a, 0x7c,
+	0x01, 0x57, 0x40, 0x7c,
+	0x41, 0x6a, 0x96, 0x5e,
+	0x00, 0x65, 0x40, 0x44,
+	0x07, 0x6a, 0x1a, 0x5d,
+	0x01, 0x06, 0xd4, 0x30,
+	0x00, 0x65, 0xbe, 0x41,
+	0x10, 0xb8, 0x48, 0x7c,
+	0xa1, 0x6a, 0x96, 0x5e,
+	0x01, 0xb4, 0x4e, 0x6c,
+	0x02, 0xb4, 0x50, 0x6c,
+	0x01, 0xa4, 0x50, 0x7c,
+	0xff, 0xa8, 0x60, 0x7c,
+	0x04, 0xb4, 0x68, 0x01,
+	0x01, 0x6a, 0x76, 0x00,
+	0x00, 0xbb, 0xda, 0x5d,
+	0xff, 0xa8, 0x60, 0x7c,
+	0x71, 0x6a, 0x96, 0x5e,
+	0x40, 0x51, 0x60, 0x64,
+	0x00, 0x65, 0x76, 0x5e,
+	0x00, 0x65, 0xd0, 0x41,
+	0x00, 0xbb, 0x64, 0x5c,
+	0x00, 0x65, 0xd0, 0x41,
+	0x00, 0x65, 0x76, 0x5e,
+	0x01, 0x65, 0xa2, 0x30,
+	0x01, 0xf8, 0xc8, 0x30,
+	0x01, 0x4e, 0xc8, 0x30,
+	0x00, 0x6a, 0x7e, 0xdd,
+	0x00, 0x51, 0x90, 0x5d,
+	0x01, 0x4e, 0x9c, 0x18,
+	0x02, 0x6a, 0x22, 0x05,
+	0x04, 0xb8, 0x70, 0x01,
+	0x00, 0x65, 0x92, 0x5e,
+	0x20, 0xb8, 0xd0, 0x69,
+	0x01, 0xbb, 0xa2, 0x30,
+	0x01, 0xba, 0x7c, 0x30,
+	0x00, 0xb9, 0x94, 0x5c,
+	0x00, 0x65, 0xd0, 0x41,
+	0x20, 0x3c, 0x40, 0x7c,
+	0x04, 0x14, 0x58, 0x31,
+	0x08, 0xa0, 0x60, 0x31,
+	0xac, 0x6a, 0xcc, 0x00,
+	0x14, 0x6a, 0xbc, 0x5d,
+	0xa0, 0x6a, 0xb4, 0x5d,
+	0x00, 0x65, 0x40, 0x44,
+	0xdf, 0x3c, 0x78, 0x08,
+	0x00, 0x65, 0x40, 0x44,
+	0x4c, 0x65, 0xcc, 0x28,
+	0x01, 0x3e, 0x20, 0x31,
+	0xd0, 0x66, 0xcc, 0x18,
+	0x20, 0x66, 0xcc, 0x18,
+	0x01, 0x51, 0xda, 0x34,
+	0x4c, 0x3d, 0xca, 0x28,
+	0x3f, 0x64, 0x7c, 0x08,
+	0xd0, 0x65, 0xca, 0x18,
+	0x01, 0x3e, 0x20, 0x31,
+	0x30, 0x65, 0xd4, 0x18,
+	0x00, 0x65, 0xac, 0x4c,
+	0xe1, 0x6a, 0x22, 0x01,
+	0xff, 0x6a, 0xd4, 0x08,
+	0x20, 0x65, 0xd4, 0x18,
+	0x00, 0x65, 0xb4, 0x54,
+	0xe1, 0x6a, 0x22, 0x01,
+	0xff, 0x6a, 0xd4, 0x08,
+	0x20, 0x65, 0xca, 0x18,
+	0xe0, 0x65, 0xd4, 0x18,
+	0x00, 0x65, 0xbe, 0x4c,
+	0xe1, 0x6a, 0x22, 0x01,
+	0xff, 0x6a, 0xd4, 0x08,
+	0xd0, 0x65, 0xd4, 0x18,
+	0x00, 0x65, 0xc6, 0x54,
+	0xe1, 0x6a, 0x22, 0x01,
+	0xff, 0x6a, 0xd4, 0x08,
+	0x01, 0x6c, 0xa2, 0x30,
+	0xff, 0x51, 0xd8, 0x74,
+	0x00, 0x51, 0x56, 0x5d,
+	0x01, 0x51, 0x20, 0x31,
+	0x00, 0x65, 0xfa, 0x44,
+	0x01, 0xba, 0xc8, 0x30,
+	0x00, 0x3e, 0xfa, 0x74,
+	0x00, 0x65, 0x74, 0x5e,
+	0x80, 0x3c, 0x78, 0x00,
+	0x01, 0x06, 0xd4, 0x30,
+	0x00, 0x65, 0xa0, 0x5d,
+	0x01, 0x3c, 0x78, 0x00,
+	0xe0, 0x3f, 0x16, 0x65,
+	0x02, 0x3c, 0x78, 0x00,
+	0x20, 0x12, 0x16, 0x65,
+	0x51, 0x6a, 0x22, 0x5d,
+	0x00, 0x51, 0x56, 0x5d,
+	0x51, 0x6a, 0x22, 0x5d,
+	0x01, 0x51, 0x20, 0x31,
+	0x04, 0x3c, 0x78, 0x00,
+	0x01, 0xb9, 0xc8, 0x30,
+	0x00, 0x3d, 0x14, 0x65,
+	0x08, 0x3c, 0x78, 0x00,
+	0x01, 0xba, 0xc8, 0x30,
+	0x00, 0x3e, 0x14, 0x65,
+	0x10, 0x3c, 0x78, 0x00,
+	0x04, 0xb8, 0x14, 0x7d,
+	0xfb, 0xb8, 0x70, 0x09,
+	0x20, 0xb8, 0x0a, 0x6d,
+	0x01, 0x90, 0xc8, 0x30,
+	0xff, 0x6a, 0xa2, 0x00,
+	0x00, 0x3d, 0x94, 0x5c,
+	0x01, 0x64, 0x20, 0x31,
+	0x80, 0x6a, 0x78, 0x00,
+	0x00, 0x65, 0x02, 0x59,
+	0x10, 0xb8, 0x40, 0x7c,
+	0xff, 0x6a, 0x1a, 0x5d,
+	0x00, 0x65, 0x40, 0x44,
+	0x00, 0x65, 0x74, 0x5e,
+	0x31, 0x6a, 0x96, 0x5e,
+	0x00, 0x65, 0x40, 0x44,
+	0x10, 0x3f, 0x06, 0x00,
+	0x01, 0x65, 0x74, 0x34,
+	0x81, 0x6a, 0x96, 0x5e,
+	0x00, 0x65, 0x24, 0x45,
+	0x01, 0x06, 0xd4, 0x30,
+	0x01, 0x0c, 0x24, 0x7d,
+	0x04, 0x0c, 0x1e, 0x6d,
+	0xe0, 0x03, 0x7e, 0x08,
+	0xe0, 0x3f, 0xbe, 0x61,
+	0x01, 0x65, 0xcc, 0x30,
+	0x01, 0x12, 0xda, 0x34,
+	0x01, 0x06, 0xd4, 0x34,
+	0x01, 0x03, 0x32, 0x6d,
+	0x40, 0x03, 0xcc, 0x08,
+	0x01, 0x65, 0x06, 0x30,
+	0x40, 0x65, 0xc8, 0x08,
+	0x00, 0x66, 0x40, 0x75,
+	0x40, 0x65, 0x40, 0x7d,
+	0x00, 0x65, 0x40, 0x5d,
+	0xff, 0x6a, 0xd4, 0x08,
+	0xff, 0x6a, 0xd4, 0x08,
+	0xff, 0x6a, 0xd4, 0x08,
+	0xff, 0x6a, 0xd4, 0x0c,
+	0x08, 0x01, 0x02, 0x00,
+	0x02, 0x0b, 0x4a, 0x7d,
+	0x01, 0x65, 0x0c, 0x30,
+	0x02, 0x0b, 0x4e, 0x7d,
+	0xf7, 0x01, 0x02, 0x0c,
+	0x80, 0x3c, 0x9a, 0x6e,
+	0x21, 0x6a, 0x96, 0x46,
+	0x01, 0x65, 0xc8, 0x30,
+	0xff, 0x41, 0x76, 0x75,
+	0x01, 0x41, 0x20, 0x31,
+	0xff, 0x6a, 0xa4, 0x00,
+	0x00, 0x65, 0x66, 0x45,
+	0xff, 0xbf, 0x76, 0x75,
+	0x01, 0x90, 0xa4, 0x30,
+	0x01, 0xbf, 0x20, 0x31,
+	0x00, 0xbb, 0x60, 0x65,
+	0xff, 0x52, 0x74, 0x75,
+	0x01, 0xbf, 0xcc, 0x30,
+	0x01, 0x90, 0xca, 0x30,
+	0x01, 0x52, 0x20, 0x31,
+	0x01, 0x66, 0x7e, 0x31,
+	0x01, 0x65, 0x20, 0x35,
+	0x01, 0xbf, 0x82, 0x34,
+	0x01, 0x64, 0xa2, 0x30,
+	0x00, 0x6a, 0x7e, 0x5e,
+	0x0d, 0x6a, 0x76, 0x00,
+	0x00, 0x51, 0xda, 0x45,
+	0x01, 0x65, 0xa4, 0x30,
+	0xe0, 0x6a, 0xcc, 0x00,
+	0x48, 0x6a, 0xce, 0x5d,
+	0x01, 0x6a, 0xd0, 0x01,
+	0x01, 0x6a, 0xdc, 0x05,
+	0x88, 0x6a, 0xcc, 0x00,
+	0x48, 0x6a, 0xce, 0x5d,
+	0x01, 0x6a, 0xa8, 0x5d,
+	0x01, 0x6a, 0x26, 0x05,
+	0x01, 0x65, 0xd8, 0x31,
+	0x09, 0xee, 0xdc, 0x01,
+	0x80, 0xee, 0x94, 0x7d,
+	0xff, 0x6a, 0xdc, 0x0d,
+	0x01, 0x65, 0x32, 0x31,
+	0x0a, 0x93, 0x26, 0x01,
+	0x00, 0x65, 0x6c, 0x46,
+	0x81, 0x6a, 0x96, 0x5e,
+	0x01, 0x0c, 0xa0, 0x7d,
+	0x04, 0x0c, 0x9e, 0x6d,
+	0xe0, 0x03, 0x06, 0x08,
+	0xe0, 0x03, 0x7e, 0x0c,
+	0x01, 0x65, 0x18, 0x31,
+	0xff, 0x6a, 0x1a, 0x09,
+	0xff, 0x6a, 0x1c, 0x0d,
+	0x01, 0x8c, 0x10, 0x30,
+	0x01, 0x8d, 0x12, 0x30,
+	0x01, 0x8e, 0x14, 0x34,
+	0x01, 0x6c, 0xda, 0x30,
+	0x01, 0x6c, 0xda, 0x30,
+	0x01, 0x6c, 0xda, 0x30,
+	0x01, 0x6c, 0xda, 0x30,
+	0x01, 0x6c, 0xda, 0x30,
+	0x01, 0x6c, 0xda, 0x30,
+	0x01, 0x6c, 0xda, 0x30,
+	0x01, 0x6c, 0xda, 0x34,
+	0x3d, 0x64, 0xa4, 0x28,
+	0x55, 0x64, 0xc8, 0x28,
+	0x00, 0x65, 0xce, 0x45,
+	0x2e, 0x64, 0xa4, 0x28,
+	0x66, 0x64, 0xc8, 0x28,
+	0x00, 0x6c, 0xda, 0x18,
+	0x01, 0x52, 0xc8, 0x30,
+	0x00, 0x6c, 0xda, 0x20,
+	0xff, 0x6a, 0xc8, 0x08,
+	0x00, 0x6c, 0xda, 0x20,
+	0x00, 0x6c, 0xda, 0x24,
+	0x01, 0x65, 0xc8, 0x30,
+	0xe0, 0x6a, 0xcc, 0x00,
+	0x44, 0x6a, 0xca, 0x5d,
+	0x01, 0x90, 0xe2, 0x31,
+	0x04, 0x3b, 0xee, 0x7d,
+	0x30, 0x6a, 0xd0, 0x01,
+	0x20, 0x6a, 0xd0, 0x01,
+	0x1d, 0x6a, 0xdc, 0x01,
+	0xdc, 0xee, 0xea, 0x65,
+	0x00, 0x65, 0x06, 0x46,
+	0x20, 0x6a, 0xd0, 0x01,
+	0x01, 0x6a, 0xdc, 0x01,
+	0x20, 0xa0, 0xd8, 0x31,
+	0x09, 0xee, 0xdc, 0x01,
+	0x80, 0xee, 0xf6, 0x7d,
+	0x11, 0x6a, 0xdc, 0x01,
+	0x50, 0xee, 0xfa, 0x65,
+	0x20, 0x6a, 0xd0, 0x01,
+	0x09, 0x6a, 0xdc, 0x01,
+	0x88, 0xee, 0x00, 0x66,
+	0x19, 0x6a, 0xdc, 0x01,
+	0xd8, 0xee, 0x04, 0x66,
+	0xff, 0x6a, 0xdc, 0x09,
+	0x18, 0xee, 0x08, 0x6e,
+	0xff, 0x6a, 0xd4, 0x0c,
+	0x88, 0x6a, 0xcc, 0x00,
+	0x44, 0x6a, 0xca, 0x5d,
+	0x20, 0x6a, 0xa8, 0x5d,
+	0x01, 0x3b, 0x26, 0x31,
+	0x04, 0x3b, 0x22, 0x6e,
+	0xa0, 0x6a, 0xca, 0x00,
+	0x20, 0x65, 0xc8, 0x18,
+	0x00, 0x65, 0x5c, 0x5e,
+	0x00, 0x65, 0x1a, 0x66,
+	0x0a, 0x93, 0x26, 0x01,
+	0x00, 0x65, 0x6c, 0x46,
+	0xa0, 0x6a, 0xcc, 0x00,
+	0xff, 0x6a, 0xc8, 0x08,
+	0x01, 0x94, 0x26, 0x6e,
+	0x10, 0x94, 0x28, 0x6e,
+	0x08, 0x94, 0x3e, 0x6e,
+	0x08, 0x94, 0x3e, 0x6e,
+	0x08, 0x94, 0x3e, 0x6e,
+	0x07, 0x8c, 0xca, 0x18,
+	0x3d, 0x65, 0xca, 0x28,
+	0x00, 0x65, 0xc8, 0x18,
+	0x00, 0x65, 0x42, 0x5e,
+	0xff, 0x65, 0xca, 0x10,
+	0x05, 0x65, 0xc8, 0x18,
+	0x00, 0x65, 0x26, 0x46,
+	0xf7, 0x93, 0x26, 0x09,
+	0x08, 0x93, 0x40, 0x6e,
+	0x00, 0x62, 0xc4, 0x18,
+	0x00, 0x65, 0x6c, 0x5e,
+	0x00, 0x65, 0x4c, 0x5e,
+	0x00, 0x65, 0x4c, 0x5e,
+	0x00, 0x65, 0x4c, 0x5e,
+	0x01, 0x99, 0xda, 0x30,
+	0x01, 0x99, 0xda, 0x30,
+	0x01, 0x99, 0xda, 0x30,
+	0x01, 0x99, 0xda, 0x30,
+	0x01, 0x99, 0xda, 0x30,
+	0x01, 0x99, 0xda, 0x30,
+	0x01, 0x99, 0xda, 0x30,
+	0x01, 0x99, 0xda, 0x34,
+	0x01, 0x6c, 0x32, 0x31,
+	0x01, 0x6c, 0x32, 0x31,
+	0x01, 0x6c, 0x32, 0x31,
+	0x01, 0x6c, 0x32, 0x31,
+	0x01, 0x6c, 0x32, 0x31,
+	0x01, 0x6c, 0x32, 0x31,
+	0x01, 0x6c, 0x32, 0x31,
+	0x01, 0x6c, 0x32, 0x35,
+	0x08, 0x94, 0x6c, 0x7e,
+	0xf7, 0x93, 0x26, 0x09,
+	0x08, 0x93, 0x70, 0x6e,
+	0xff, 0x6a, 0xd4, 0x0c,
+	0x04, 0xb8, 0x92, 0x6e,
+	0x01, 0x42, 0x7e, 0x31,
+	0xff, 0x6a, 0x76, 0x01,
+	0x01, 0x90, 0x84, 0x34,
+	0xff, 0x6a, 0x76, 0x05,
+	0xff, 0x42, 0x8e, 0x66,
+	0xff, 0x41, 0x86, 0x66,
+	0xd1, 0x6a, 0x96, 0x5e,
+	0xff, 0x6a, 0xca, 0x04,
+	0x01, 0x41, 0x20, 0x31,
+	0x01, 0xbf, 0x82, 0x30,
+	0x01, 0x6a, 0x76, 0x00,
+	0x00, 0xbb, 0xda, 0x45,
+	0x01, 0x42, 0x20, 0x31,
+	0x01, 0xbf, 0x84, 0x34,
+	0x01, 0x41, 0x7e, 0x31,
+	0x01, 0x90, 0x82, 0x34,
+	0x01, 0x65, 0x22, 0x31,
+	0xff, 0x6a, 0xd4, 0x08,
+	0xff, 0x6a, 0xd4, 0x0c
+};
+
+static int ahc_patch22_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch22_func(struct ahc_softc *ahc)
+{
+	return ((ahc->bugs & AHC_SCBCHAN_UPLOAD_BUG) != 0);
+}
+
+static int ahc_patch21_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch21_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_CMD_CHAN) == 0);
+}
+
+static int ahc_patch20_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch20_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_QUEUE_REGS) == 0);
+}
+
+static int ahc_patch19_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch19_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_WIDE) != 0);
+}
+
+static int ahc_patch18_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch18_func(struct ahc_softc *ahc)
+{
+	return ((ahc->flags & AHC_SCB_BTT) != 0);
+}
+
+static int ahc_patch17_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch17_func(struct ahc_softc *ahc)
+{
+	return ((ahc->bugs & AHC_PCI_2_1_RETRY_BUG) != 0);
+}
+
+static int ahc_patch16_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch16_func(struct ahc_softc *ahc)
+{
+	return ((ahc->flags & AHC_TMODE_WIDEODD_BUG) != 0);
+}
+
+static int ahc_patch15_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch15_func(struct ahc_softc *ahc)
+{
+	return ((ahc->bugs & AHC_AUTOFLUSH_BUG) != 0);
+}
+
+static int ahc_patch14_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch14_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_DT) == 0);
+}
+
+static int ahc_patch13_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch13_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_ULTRA2) == 0);
+}
+
+static int ahc_patch12_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch12_func(struct ahc_softc *ahc)
+{
+	return ((ahc->bugs & AHC_PCI_MWI_BUG) != 0 && ahc->pci_cachesize != 0);
+}
+
+static int ahc_patch11_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch11_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_ULTRA) != 0);
+}
+
+static int ahc_patch10_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch10_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_HS_MAILBOX) != 0);
+}
+
+static int ahc_patch9_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch9_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_MULTI_TID) != 0);
+}
+
+static int ahc_patch8_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch8_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_CMD_CHAN) != 0);
+}
+
+static int ahc_patch7_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch7_func(struct ahc_softc *ahc)
+{
+	return ((ahc->flags & AHC_INITIATORROLE) != 0);
+}
+
+static int ahc_patch6_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch6_func(struct ahc_softc *ahc)
+{
+	return ((ahc->flags & AHC_TARGETROLE) != 0);
+}
+
+static int ahc_patch5_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch5_func(struct ahc_softc *ahc)
+{
+	return ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0);
+}
+
+static int ahc_patch4_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch4_func(struct ahc_softc *ahc)
+{
+	return ((ahc->flags & AHC_PAGESCBS) != 0);
+}
+
+static int ahc_patch3_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch3_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_QUEUE_REGS) != 0);
+}
+
+static int ahc_patch2_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch2_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_TWIN) != 0);
+}
+
+static int ahc_patch1_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch1_func(struct ahc_softc *ahc)
+{
+	return ((ahc->features & AHC_ULTRA2) != 0);
+}
+
+static int ahc_patch0_func(struct ahc_softc *ahc);
+
+static int
+ahc_patch0_func(struct ahc_softc *ahc)
+{
+	return (0);
+}
+
+typedef int patch_func_t (struct ahc_softc *);
+struct patch {
+	patch_func_t	*patch_func;
+	uint32_t	begin	   :10,
+			skip_instr :10,
+			skip_patch :12;
+} patches[] = {
+	{ ahc_patch1_func, 4, 1, 1 },
+	{ ahc_patch2_func, 6, 2, 1 },
+	{ ahc_patch2_func, 9, 1, 1 },
+	{ ahc_patch3_func, 11, 1, 2 },
+	{ ahc_patch0_func, 12, 2, 1 },
+	{ ahc_patch4_func, 15, 1, 2 },
+	{ ahc_patch0_func, 16, 1, 1 },
+	{ ahc_patch5_func, 22, 2, 1 },
+	{ ahc_patch3_func, 27, 1, 2 },
+	{ ahc_patch0_func, 28, 1, 1 },
+	{ ahc_patch6_func, 37, 65, 21 },
+	{ ahc_patch7_func, 37, 1, 1 },
+	{ ahc_patch8_func, 45, 3, 2 },
+	{ ahc_patch0_func, 48, 3, 1 },
+	{ ahc_patch9_func, 52, 1, 2 },
+	{ ahc_patch0_func, 53, 2, 3 },
+	{ ahc_patch1_func, 53, 1, 2 },
+	{ ahc_patch0_func, 54, 1, 1 },
+	{ ahc_patch2_func, 56, 2, 1 },
+	{ ahc_patch8_func, 58, 1, 2 },
+	{ ahc_patch0_func, 59, 1, 1 },
+	{ ahc_patch8_func, 63, 1, 2 },
+	{ ahc_patch0_func, 64, 1, 1 },
+	{ ahc_patch8_func, 73, 1, 2 },
+	{ ahc_patch0_func, 74, 1, 1 },
+	{ ahc_patch8_func, 77, 1, 2 },
+	{ ahc_patch0_func, 78, 1, 1 },
+	{ ahc_patch10_func, 88, 1, 2 },
+	{ ahc_patch0_func, 89, 1, 1 },
+	{ ahc_patch8_func, 97, 1, 2 },
+	{ ahc_patch0_func, 98, 1, 1 },
+	{ ahc_patch7_func, 102, 9, 4 },
+	{ ahc_patch1_func, 104, 1, 2 },
+	{ ahc_patch0_func, 105, 1, 1 },
+	{ ahc_patch2_func, 107, 2, 1 },
+	{ ahc_patch2_func, 116, 4, 1 },
+	{ ahc_patch1_func, 120, 1, 2 },
+	{ ahc_patch0_func, 121, 2, 3 },
+	{ ahc_patch2_func, 121, 1, 2 },
+	{ ahc_patch0_func, 122, 1, 1 },
+	{ ahc_patch6_func, 123, 4, 2 },
+	{ ahc_patch0_func, 127, 1, 1 },
+	{ ahc_patch11_func, 129, 2, 1 },
+	{ ahc_patch1_func, 131, 1, 2 },
+	{ ahc_patch0_func, 132, 1, 1 },
+	{ ahc_patch6_func, 133, 4, 1 },
+	{ ahc_patch6_func, 144, 77, 9 },
+	{ ahc_patch4_func, 156, 1, 1 },
+	{ ahc_patch1_func, 172, 1, 1 },
+	{ ahc_patch8_func, 180, 1, 2 },
+	{ ahc_patch0_func, 181, 1, 1 },
+	{ ahc_patch8_func, 190, 1, 2 },
+	{ ahc_patch0_func, 191, 1, 1 },
+	{ ahc_patch8_func, 207, 6, 2 },
+	{ ahc_patch0_func, 213, 6, 1 },
+	{ ahc_patch7_func, 221, 18, 2 },
+	{ ahc_patch1_func, 234, 1, 1 },
+	{ ahc_patch1_func, 241, 1, 2 },
+	{ ahc_patch0_func, 242, 2, 2 },
+	{ ahc_patch11_func, 243, 1, 1 },
+	{ ahc_patch8_func, 251, 33, 2 },
+	{ ahc_patch1_func, 267, 16, 1 },
+	{ ahc_patch12_func, 284, 14, 1 },
+	{ ahc_patch1_func, 298, 2, 2 },
+	{ ahc_patch0_func, 300, 3, 3 },
+	{ ahc_patch8_func, 300, 1, 2 },
+	{ ahc_patch0_func, 301, 2, 1 },
+	{ ahc_patch1_func, 305, 1, 2 },
+	{ ahc_patch0_func, 306, 1, 1 },
+	{ ahc_patch8_func, 310, 1, 1 },
+	{ ahc_patch8_func, 313, 2, 2 },
+	{ ahc_patch0_func, 315, 4, 1 },
+	{ ahc_patch12_func, 319, 1, 1 },
+	{ ahc_patch13_func, 322, 2, 3 },
+	{ ahc_patch8_func, 322, 1, 2 },
+	{ ahc_patch0_func, 323, 1, 1 },
+	{ ahc_patch1_func, 332, 40, 6 },
+	{ ahc_patch6_func, 341, 1, 1 },
+	{ ahc_patch7_func, 342, 1, 1 },
+	{ ahc_patch14_func, 344, 2, 1 },
+	{ ahc_patch15_func, 346, 5, 1 },
+	{ ahc_patch0_func, 372, 51, 15 },
+	{ ahc_patch12_func, 372, 1, 1 },
+	{ ahc_patch6_func, 374, 2, 2 },
+	{ ahc_patch16_func, 375, 1, 1 },
+	{ ahc_patch8_func, 378, 1, 1 },
+	{ ahc_patch17_func, 385, 1, 1 },
+	{ ahc_patch12_func, 390, 9, 3 },
+	{ ahc_patch8_func, 391, 3, 2 },
+	{ ahc_patch0_func, 394, 3, 1 },
+	{ ahc_patch8_func, 402, 6, 2 },
+	{ ahc_patch0_func, 408, 8, 1 },
+	{ ahc_patch12_func, 416, 1, 1 },
+	{ ahc_patch8_func, 418, 1, 2 },
+	{ ahc_patch0_func, 419, 1, 1 },
+	{ ahc_patch6_func, 422, 1, 1 },
+	{ ahc_patch6_func, 423, 1, 1 },
+	{ ahc_patch7_func, 424, 2, 1 },
+	{ ahc_patch8_func, 426, 1, 1 },
+	{ ahc_patch12_func, 427, 9, 4 },
+	{ ahc_patch8_func, 427, 1, 1 },
+	{ ahc_patch8_func, 434, 2, 1 },
+	{ ahc_patch0_func, 436, 4, 3 },
+	{ ahc_patch8_func, 436, 1, 2 },
+	{ ahc_patch0_func, 437, 3, 1 },
+	{ ahc_patch1_func, 441, 2, 1 },
+	{ ahc_patch6_func, 443, 5, 2 },
+	{ ahc_patch0_func, 448, 1, 1 },
+	{ ahc_patch7_func, 449, 113, 22 },
+	{ ahc_patch1_func, 450, 3, 2 },
+	{ ahc_patch0_func, 453, 5, 3 },
+	{ ahc_patch8_func, 453, 2, 2 },
+	{ ahc_patch0_func, 455, 3, 1 },
+	{ ahc_patch1_func, 460, 2, 2 },
+	{ ahc_patch0_func, 462, 6, 3 },
+	{ ahc_patch8_func, 462, 2, 2 },
+	{ ahc_patch0_func, 464, 3, 1 },
+	{ ahc_patch1_func, 470, 2, 2 },
+	{ ahc_patch0_func, 472, 9, 7 },
+	{ ahc_patch8_func, 472, 5, 6 },
+	{ ahc_patch18_func, 472, 1, 2 },
+	{ ahc_patch0_func, 473, 1, 1 },
+	{ ahc_patch18_func, 475, 1, 2 },
+	{ ahc_patch0_func, 476, 1, 1 },
+	{ ahc_patch0_func, 477, 4, 1 },
+	{ ahc_patch1_func, 486, 1, 1 },
+	{ ahc_patch2_func, 498, 2, 2 },
+	{ ahc_patch0_func, 500, 2, 2 },
+	{ ahc_patch19_func, 500, 2, 1 },
+	{ ahc_patch19_func, 536, 7, 1 },
+	{ ahc_patch3_func, 564, 1, 2 },
+	{ ahc_patch0_func, 565, 1, 1 },
+	{ ahc_patch20_func, 568, 1, 1 },
+	{ ahc_patch7_func, 570, 95, 26 },
+	{ ahc_patch4_func, 571, 1, 1 },
+	{ ahc_patch8_func, 578, 2, 2 },
+	{ ahc_patch0_func, 580, 3, 1 },
+	{ ahc_patch18_func, 587, 2, 2 },
+	{ ahc_patch0_func, 589, 1, 1 },
+	{ ahc_patch18_func, 593, 10, 3 },
+	{ ahc_patch5_func, 595, 8, 1 },
+	{ ahc_patch0_func, 603, 9, 2 },
+	{ ahc_patch5_func, 604, 8, 1 },
+	{ ahc_patch4_func, 614, 1, 2 },
+	{ ahc_patch0_func, 615, 1, 1 },
+	{ ahc_patch18_func, 616, 1, 2 },
+	{ ahc_patch0_func, 617, 3, 2 },
+	{ ahc_patch4_func, 619, 1, 1 },
+	{ ahc_patch5_func, 620, 1, 1 },
+	{ ahc_patch5_func, 623, 1, 1 },
+	{ ahc_patch5_func, 625, 1, 1 },
+	{ ahc_patch4_func, 627, 2, 2 },
+	{ ahc_patch0_func, 629, 2, 1 },
+	{ ahc_patch5_func, 631, 1, 1 },
+	{ ahc_patch5_func, 634, 1, 1 },
+	{ ahc_patch5_func, 637, 1, 1 },
+	{ ahc_patch18_func, 641, 1, 1 },
+	{ ahc_patch18_func, 644, 1, 1 },
+	{ ahc_patch4_func, 650, 1, 1 },
+	{ ahc_patch6_func, 665, 16, 1 },
+	{ ahc_patch4_func, 683, 20, 1 },
+	{ ahc_patch8_func, 704, 4, 2 },
+	{ ahc_patch0_func, 708, 4, 1 },
+	{ ahc_patch8_func, 712, 4, 2 },
+	{ ahc_patch0_func, 716, 3, 1 },
+	{ ahc_patch21_func, 724, 14, 1 },
+	{ ahc_patch6_func, 738, 3, 1 },
+	{ ahc_patch8_func, 750, 24, 8 },
+	{ ahc_patch18_func, 754, 1, 2 },
+	{ ahc_patch0_func, 755, 1, 1 },
+	{ ahc_patch13_func, 760, 4, 2 },
+	{ ahc_patch0_func, 764, 7, 3 },
+	{ ahc_patch22_func, 764, 5, 2 },
+	{ ahc_patch0_func, 769, 2, 1 },
+	{ ahc_patch0_func, 774, 40, 3 },
+	{ ahc_patch17_func, 786, 16, 2 },
+	{ ahc_patch0_func, 802, 1, 1 },
+	{ ahc_patch4_func, 826, 1, 1 },
+	{ ahc_patch4_func, 827, 3, 2 },
+	{ ahc_patch0_func, 830, 1, 1 },
+	{ ahc_patch4_func, 831, 12, 1 }
+};
+struct cs {
+	u_int16_t	begin;
+	u_int16_t	end;
+} critical_sections[] = {
+	{ 11, 18 },
+	{ 21, 30 },
+	{ 683, 699 },
+	{ 827, 830 },
+	{ 831, 837 },
+	{ 839, 841 },
+	{ 841, 843 }
+};
+const int num_critical_sections = sizeof(critical_sections)
+				 / sizeof(*critical_sections);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)