diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:25:34 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:25:34 -0400 |
commit | 41ace1861a93f12f70ff10026fb1539fea38fcf8 (patch) | |
tree | c6d841ae9b73d6b7d6a887c21ce378cebc9c97f7 /drivers | |
parent | 09e590e5d5a93f2eaa748a89c623258e6bad1648 (diff) | |
parent | ef7d1b244fa6c94fb76d5f787b8629df64ea4046 (diff) |
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'drivers')
54 files changed, 374 insertions, 277 deletions
diff --git a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig index d53f664a4dd8..fff89c2d88fd 100644 --- a/drivers/char/watchdog/Kconfig +++ b/drivers/char/watchdog/Kconfig | |||
@@ -45,7 +45,7 @@ config WATCHDOG_NOWAYOUT | |||
45 | comment "Watchdog Device Drivers" | 45 | comment "Watchdog Device Drivers" |
46 | depends on WATCHDOG | 46 | depends on WATCHDOG |
47 | 47 | ||
48 | # Architecture Independant | 48 | # Architecture Independent |
49 | 49 | ||
50 | config SOFT_WATCHDOG | 50 | config SOFT_WATCHDOG |
51 | tristate "Software watchdog" | 51 | tristate "Software watchdog" |
@@ -127,7 +127,7 @@ config S3C2410_WATCHDOG | |||
127 | enabled. | 127 | enabled. |
128 | 128 | ||
129 | The driver is limited by the speed of the system's PCLK | 129 | The driver is limited by the speed of the system's PCLK |
130 | signal, so with reasonbaly fast systems (PCLK around 50-66MHz) | 130 | signal, so with reasonably fast systems (PCLK around 50-66MHz) |
131 | then watchdog intervals of over approximately 20seconds are | 131 | then watchdog intervals of over approximately 20seconds are |
132 | unavailable. | 132 | unavailable. |
133 | 133 | ||
@@ -423,7 +423,7 @@ config SBC_EPX_C3_WATCHDOG | |||
423 | is no way to know if writing to its IO address will corrupt | 423 | is no way to know if writing to its IO address will corrupt |
424 | your system or have any real effect. The only way to be sure | 424 | your system or have any real effect. The only way to be sure |
425 | that this driver does what you want is to make sure you | 425 | that this driver does what you want is to make sure you |
426 | are runnning it on an EPX-C3 from Winsystems with the watchdog | 426 | are running it on an EPX-C3 from Winsystems with the watchdog |
427 | timer at IO address 0x1ee and 0x1ef. It will write to both those | 427 | timer at IO address 0x1ee and 0x1ef. It will write to both those |
428 | IO ports. Basically, the assumption is made that if you compile | 428 | IO ports. Basically, the assumption is made that if you compile |
429 | this driver into your kernel and/or load it as a module, that you | 429 | this driver into your kernel and/or load it as a module, that you |
@@ -472,7 +472,7 @@ config INDYDOG | |||
472 | tristate "Indy/I2 Hardware Watchdog" | 472 | tristate "Indy/I2 Hardware Watchdog" |
473 | depends on WATCHDOG && SGI_IP22 | 473 | depends on WATCHDOG && SGI_IP22 |
474 | help | 474 | help |
475 | Hardwaredriver for the Indy's/I2's watchdog. This is a | 475 | Hardware driver for the Indy's/I2's watchdog. This is a |
476 | watchdog timer that will reboot the machine after a 60 second | 476 | watchdog timer that will reboot the machine after a 60 second |
477 | timer expired and no process has written to /dev/watchdog during | 477 | timer expired and no process has written to /dev/watchdog during |
478 | that time. | 478 | that time. |
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index 2f962cfa3f7f..78810ba982e9 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
@@ -180,6 +180,36 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { | |||
180 | .channels = 2, | 180 | .channels = 2, |
181 | .autodma = AUTODMA, | 181 | .autodma = AUTODMA, |
182 | .bootable = OFF_BOARD, | 182 | .bootable = OFF_BOARD, |
183 | },{ /* 15 */ | ||
184 | .name = "JMB361", | ||
185 | .init_hwif = init_hwif_generic, | ||
186 | .channels = 2, | ||
187 | .autodma = AUTODMA, | ||
188 | .bootable = OFF_BOARD, | ||
189 | },{ /* 16 */ | ||
190 | .name = "JMB363", | ||
191 | .init_hwif = init_hwif_generic, | ||
192 | .channels = 2, | ||
193 | .autodma = AUTODMA, | ||
194 | .bootable = OFF_BOARD, | ||
195 | },{ /* 17 */ | ||
196 | .name = "JMB365", | ||
197 | .init_hwif = init_hwif_generic, | ||
198 | .channels = 2, | ||
199 | .autodma = AUTODMA, | ||
200 | .bootable = OFF_BOARD, | ||
201 | },{ /* 18 */ | ||
202 | .name = "JMB366", | ||
203 | .init_hwif = init_hwif_generic, | ||
204 | .channels = 2, | ||
205 | .autodma = AUTODMA, | ||
206 | .bootable = OFF_BOARD, | ||
207 | },{ /* 19 */ | ||
208 | .name = "JMB368", | ||
209 | .init_hwif = init_hwif_generic, | ||
210 | .channels = 2, | ||
211 | .autodma = AUTODMA, | ||
212 | .bootable = OFF_BOARD, | ||
183 | } | 213 | } |
184 | }; | 214 | }; |
185 | 215 | ||
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 217615b33223..93f701ea87bc 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -710,6 +710,8 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc, | |||
710 | return -EINVAL; | 710 | return -EINVAL; |
711 | } | 711 | } |
712 | 712 | ||
713 | m->ti = ti; | ||
714 | |||
713 | r = parse_features(&as, m, ti); | 715 | r = parse_features(&as, m, ti); |
714 | if (r) | 716 | if (r) |
715 | goto bad; | 717 | goto bad; |
@@ -751,7 +753,6 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc, | |||
751 | } | 753 | } |
752 | 754 | ||
753 | ti->private = m; | 755 | ti->private = m; |
754 | m->ti = ti; | ||
755 | 756 | ||
756 | return 0; | 757 | return 0; |
757 | 758 | ||
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index d687a14ec0a7..06ac899a9a26 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -393,7 +393,7 @@ static int dst_set_bandwidth(struct dst_state *state, fe_bandwidth_t bandwidth) | |||
393 | state->bandwidth = bandwidth; | 393 | state->bandwidth = bandwidth; |
394 | 394 | ||
395 | if (state->dst_type != DST_TYPE_IS_TERR) | 395 | if (state->dst_type != DST_TYPE_IS_TERR) |
396 | return 0; | 396 | return -EOPNOTSUPP; |
397 | 397 | ||
398 | switch (bandwidth) { | 398 | switch (bandwidth) { |
399 | case BANDWIDTH_6_MHZ: | 399 | case BANDWIDTH_6_MHZ: |
@@ -462,7 +462,7 @@ static int dst_set_symbolrate(struct dst_state *state, u32 srate) | |||
462 | 462 | ||
463 | state->symbol_rate = srate; | 463 | state->symbol_rate = srate; |
464 | if (state->dst_type == DST_TYPE_IS_TERR) { | 464 | if (state->dst_type == DST_TYPE_IS_TERR) { |
465 | return 0; | 465 | return -EOPNOTSUPP; |
466 | } | 466 | } |
467 | dprintk(verbose, DST_INFO, 1, "set symrate %u", srate); | 467 | dprintk(verbose, DST_INFO, 1, "set symrate %u", srate); |
468 | srate /= 1000; | 468 | srate /= 1000; |
@@ -504,7 +504,7 @@ static int dst_set_symbolrate(struct dst_state *state, u32 srate) | |||
504 | static int dst_set_modulation(struct dst_state *state, fe_modulation_t modulation) | 504 | static int dst_set_modulation(struct dst_state *state, fe_modulation_t modulation) |
505 | { | 505 | { |
506 | if (state->dst_type != DST_TYPE_IS_CABLE) | 506 | if (state->dst_type != DST_TYPE_IS_CABLE) |
507 | return 0; | 507 | return -EOPNOTSUPP; |
508 | 508 | ||
509 | state->modulation = modulation; | 509 | state->modulation = modulation; |
510 | switch (modulation) { | 510 | switch (modulation) { |
@@ -1234,7 +1234,7 @@ int dst_command(struct dst_state *state, u8 *data, u8 len) | |||
1234 | goto error; | 1234 | goto error; |
1235 | } | 1235 | } |
1236 | if (write_dst(state, data, len)) { | 1236 | if (write_dst(state, data, len)) { |
1237 | dprintk(verbose, DST_INFO, 1, "Tring to recover.. "); | 1237 | dprintk(verbose, DST_INFO, 1, "Trying to recover.. "); |
1238 | if ((dst_error_recovery(state)) < 0) { | 1238 | if ((dst_error_recovery(state)) < 0) { |
1239 | dprintk(verbose, DST_ERROR, 1, "Recovery Failed."); | 1239 | dprintk(verbose, DST_ERROR, 1, "Recovery Failed."); |
1240 | goto error; | 1240 | goto error; |
@@ -1328,15 +1328,13 @@ static int dst_tone_power_cmd(struct dst_state *state) | |||
1328 | { | 1328 | { |
1329 | u8 paket[8] = { 0x00, 0x09, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00 }; | 1329 | u8 paket[8] = { 0x00, 0x09, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00 }; |
1330 | 1330 | ||
1331 | if (state->dst_type == DST_TYPE_IS_TERR) | 1331 | if (state->dst_type != DST_TYPE_IS_SAT) |
1332 | return 0; | 1332 | return -EOPNOTSUPP; |
1333 | paket[4] = state->tx_tuna[4]; | 1333 | paket[4] = state->tx_tuna[4]; |
1334 | paket[2] = state->tx_tuna[2]; | 1334 | paket[2] = state->tx_tuna[2]; |
1335 | paket[3] = state->tx_tuna[3]; | 1335 | paket[3] = state->tx_tuna[3]; |
1336 | paket[7] = dst_check_sum (paket, 7); | 1336 | paket[7] = dst_check_sum (paket, 7); |
1337 | dst_command(state, paket, 8); | 1337 | return dst_command(state, paket, 8); |
1338 | |||
1339 | return 0; | ||
1340 | } | 1338 | } |
1341 | 1339 | ||
1342 | static int dst_get_tuna(struct dst_state *state) | 1340 | static int dst_get_tuna(struct dst_state *state) |
@@ -1465,7 +1463,7 @@ static int dst_set_diseqc(struct dvb_frontend *fe, struct dvb_diseqc_master_cmd | |||
1465 | u8 paket[8] = { 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf0, 0xec }; | 1463 | u8 paket[8] = { 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf0, 0xec }; |
1466 | 1464 | ||
1467 | if (state->dst_type != DST_TYPE_IS_SAT) | 1465 | if (state->dst_type != DST_TYPE_IS_SAT) |
1468 | return 0; | 1466 | return -EOPNOTSUPP; |
1469 | if (cmd->msg_len > 0 && cmd->msg_len < 5) | 1467 | if (cmd->msg_len > 0 && cmd->msg_len < 5) |
1470 | memcpy(&paket[3], cmd->msg, cmd->msg_len); | 1468 | memcpy(&paket[3], cmd->msg, cmd->msg_len); |
1471 | else if (cmd->msg_len == 5 && state->dst_hw_cap & DST_TYPE_HAS_DISEQC5) | 1469 | else if (cmd->msg_len == 5 && state->dst_hw_cap & DST_TYPE_HAS_DISEQC5) |
@@ -1473,18 +1471,17 @@ static int dst_set_diseqc(struct dvb_frontend *fe, struct dvb_diseqc_master_cmd | |||
1473 | else | 1471 | else |
1474 | return -EINVAL; | 1472 | return -EINVAL; |
1475 | paket[7] = dst_check_sum(&paket[0], 7); | 1473 | paket[7] = dst_check_sum(&paket[0], 7); |
1476 | dst_command(state, paket, 8); | 1474 | return dst_command(state, paket, 8); |
1477 | return 0; | ||
1478 | } | 1475 | } |
1479 | 1476 | ||
1480 | static int dst_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) | 1477 | static int dst_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) |
1481 | { | 1478 | { |
1482 | int need_cmd; | 1479 | int need_cmd, retval = 0; |
1483 | struct dst_state *state = fe->demodulator_priv; | 1480 | struct dst_state *state = fe->demodulator_priv; |
1484 | 1481 | ||
1485 | state->voltage = voltage; | 1482 | state->voltage = voltage; |
1486 | if (state->dst_type != DST_TYPE_IS_SAT) | 1483 | if (state->dst_type != DST_TYPE_IS_SAT) |
1487 | return 0; | 1484 | return -EOPNOTSUPP; |
1488 | 1485 | ||
1489 | need_cmd = 0; | 1486 | need_cmd = 0; |
1490 | 1487 | ||
@@ -1506,9 +1503,9 @@ static int dst_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) | |||
1506 | } | 1503 | } |
1507 | 1504 | ||
1508 | if (need_cmd) | 1505 | if (need_cmd) |
1509 | dst_tone_power_cmd(state); | 1506 | retval = dst_tone_power_cmd(state); |
1510 | 1507 | ||
1511 | return 0; | 1508 | return retval; |
1512 | } | 1509 | } |
1513 | 1510 | ||
1514 | static int dst_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) | 1511 | static int dst_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) |
@@ -1517,7 +1514,7 @@ static int dst_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) | |||
1517 | 1514 | ||
1518 | state->tone = tone; | 1515 | state->tone = tone; |
1519 | if (state->dst_type != DST_TYPE_IS_SAT) | 1516 | if (state->dst_type != DST_TYPE_IS_SAT) |
1520 | return 0; | 1517 | return -EOPNOTSUPP; |
1521 | 1518 | ||
1522 | switch (tone) { | 1519 | switch (tone) { |
1523 | case SEC_TONE_OFF: | 1520 | case SEC_TONE_OFF: |
@@ -1533,9 +1530,7 @@ static int dst_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) | |||
1533 | default: | 1530 | default: |
1534 | return -EINVAL; | 1531 | return -EINVAL; |
1535 | } | 1532 | } |
1536 | dst_tone_power_cmd(state); | 1533 | return dst_tone_power_cmd(state); |
1537 | |||
1538 | return 0; | ||
1539 | } | 1534 | } |
1540 | 1535 | ||
1541 | static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd) | 1536 | static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd) |
@@ -1543,7 +1538,7 @@ static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd) | |||
1543 | struct dst_state *state = fe->demodulator_priv; | 1538 | struct dst_state *state = fe->demodulator_priv; |
1544 | 1539 | ||
1545 | if (state->dst_type != DST_TYPE_IS_SAT) | 1540 | if (state->dst_type != DST_TYPE_IS_SAT) |
1546 | return 0; | 1541 | return -EOPNOTSUPP; |
1547 | state->minicmd = minicmd; | 1542 | state->minicmd = minicmd; |
1548 | switch (minicmd) { | 1543 | switch (minicmd) { |
1549 | case SEC_MINI_A: | 1544 | case SEC_MINI_A: |
@@ -1553,9 +1548,7 @@ static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd) | |||
1553 | state->tx_tuna[3] = 0xff; | 1548 | state->tx_tuna[3] = 0xff; |
1554 | break; | 1549 | break; |
1555 | } | 1550 | } |
1556 | dst_tone_power_cmd(state); | 1551 | return dst_tone_power_cmd(state); |
1557 | |||
1558 | return 0; | ||
1559 | } | 1552 | } |
1560 | 1553 | ||
1561 | 1554 | ||
@@ -1608,28 +1601,31 @@ static int dst_read_signal_strength(struct dvb_frontend *fe, u16 *strength) | |||
1608 | { | 1601 | { |
1609 | struct dst_state *state = fe->demodulator_priv; | 1602 | struct dst_state *state = fe->demodulator_priv; |
1610 | 1603 | ||
1611 | dst_get_signal(state); | 1604 | int retval = dst_get_signal(state); |
1612 | *strength = state->decode_strength; | 1605 | *strength = state->decode_strength; |
1613 | 1606 | ||
1614 | return 0; | 1607 | return retval; |
1615 | } | 1608 | } |
1616 | 1609 | ||
1617 | static int dst_read_snr(struct dvb_frontend *fe, u16 *snr) | 1610 | static int dst_read_snr(struct dvb_frontend *fe, u16 *snr) |
1618 | { | 1611 | { |
1619 | struct dst_state *state = fe->demodulator_priv; | 1612 | struct dst_state *state = fe->demodulator_priv; |
1620 | 1613 | ||
1621 | dst_get_signal(state); | 1614 | int retval = dst_get_signal(state); |
1622 | *snr = state->decode_snr; | 1615 | *snr = state->decode_snr; |
1623 | 1616 | ||
1624 | return 0; | 1617 | return retval; |
1625 | } | 1618 | } |
1626 | 1619 | ||
1627 | static int dst_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) | 1620 | static int dst_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) |
1628 | { | 1621 | { |
1622 | int retval = -EINVAL; | ||
1629 | struct dst_state *state = fe->demodulator_priv; | 1623 | struct dst_state *state = fe->demodulator_priv; |
1630 | 1624 | ||
1631 | if (p != NULL) { | 1625 | if (p != NULL) { |
1632 | dst_set_freq(state, p->frequency); | 1626 | retval = dst_set_freq(state, p->frequency); |
1627 | if(retval != 0) | ||
1628 | return retval; | ||
1633 | dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency); | 1629 | dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency); |
1634 | 1630 | ||
1635 | if (state->dst_type == DST_TYPE_IS_SAT) { | 1631 | if (state->dst_type == DST_TYPE_IS_SAT) { |
@@ -1647,10 +1643,10 @@ static int dst_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_paramet | |||
1647 | dst_set_symbolrate(state, p->u.qam.symbol_rate); | 1643 | dst_set_symbolrate(state, p->u.qam.symbol_rate); |
1648 | dst_set_modulation(state, p->u.qam.modulation); | 1644 | dst_set_modulation(state, p->u.qam.modulation); |
1649 | } | 1645 | } |
1650 | dst_write_tuna(fe); | 1646 | retval = dst_write_tuna(fe); |
1651 | } | 1647 | } |
1652 | 1648 | ||
1653 | return 0; | 1649 | return retval; |
1654 | } | 1650 | } |
1655 | 1651 | ||
1656 | static int dst_tune_frontend(struct dvb_frontend* fe, | 1652 | static int dst_tune_frontend(struct dvb_frontend* fe, |
diff --git a/drivers/media/dvb/dvb-core/Makefile b/drivers/media/dvb/dvb-core/Makefile index 11054657fdb5..0b5182835cc8 100644 --- a/drivers/media/dvb/dvb-core/Makefile +++ b/drivers/media/dvb/dvb-core/Makefile | |||
@@ -2,8 +2,8 @@ | |||
2 | # Makefile for the kernel DVB device drivers. | 2 | # Makefile for the kernel DVB device drivers. |
3 | # | 3 | # |
4 | 4 | ||
5 | dvb-core-objs = dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \ | 5 | dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \ |
6 | dvb_ca_en50221.o dvb_frontend.o \ | 6 | dvb_ca_en50221.o dvb_frontend.o \ |
7 | dvb_net.o dvb_ringbuffer.o dvb_math.o | 7 | dvb_net.o dvb_ringbuffer.o dvb_math.o |
8 | 8 | ||
9 | obj-$(CONFIG_DVB_CORE) += dvb-core.o | 9 | obj-$(CONFIG_DVB_CORE) += dvb-core.o |
diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index de3128a31de8..220076b1b956 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig | |||
@@ -350,5 +350,15 @@ config RADIO_ZOLTRIX_PORT | |||
350 | help | 350 | help |
351 | Enter the I/O port of your Zoltrix radio card. | 351 | Enter the I/O port of your Zoltrix radio card. |
352 | 352 | ||
353 | endmenu | 353 | config USB_DSBR |
354 | tristate "D-Link USB FM radio support (EXPERIMENTAL)" | ||
355 | depends on USB && VIDEO_V4L1 && EXPERIMENTAL | ||
356 | ---help--- | ||
357 | Say Y here if you want to connect this type of radio to your | ||
358 | computer's USB port. Note that the audio is not digital, and | ||
359 | you must connect the line out connector to a sound card or a | ||
360 | set of speakers. | ||
354 | 361 | ||
362 | To compile this driver as a module, choose M here: the | ||
363 | module will be called dsbr100. | ||
364 | endmenu | ||
diff --git a/drivers/media/radio/Makefile b/drivers/media/radio/Makefile index e95b6805e002..cf55a18e3ddf 100644 --- a/drivers/media/radio/Makefile +++ b/drivers/media/radio/Makefile | |||
@@ -20,5 +20,6 @@ obj-$(CONFIG_RADIO_GEMTEK) += radio-gemtek.o | |||
20 | obj-$(CONFIG_RADIO_GEMTEK_PCI) += radio-gemtek-pci.o | 20 | obj-$(CONFIG_RADIO_GEMTEK_PCI) += radio-gemtek-pci.o |
21 | obj-$(CONFIG_RADIO_TRUST) += radio-trust.o | 21 | obj-$(CONFIG_RADIO_TRUST) += radio-trust.o |
22 | obj-$(CONFIG_RADIO_MAESTRO) += radio-maestro.o | 22 | obj-$(CONFIG_RADIO_MAESTRO) += radio-maestro.o |
23 | obj-$(CONFIG_USB_DSBR) += dsbr100.o | ||
23 | 24 | ||
24 | EXTRA_CFLAGS += -Isound | 25 | EXTRA_CFLAGS += -Isound |
diff --git a/drivers/media/video/dsbr100.c b/drivers/media/radio/dsbr100.c index f7e33f9ee8e9..f7e33f9ee8e9 100644 --- a/drivers/media/video/dsbr100.c +++ b/drivers/media/radio/dsbr100.c | |||
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index fe56862d51e4..732bf1e7c326 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -449,18 +449,6 @@ source "drivers/media/video/pvrusb2/Kconfig" | |||
449 | 449 | ||
450 | source "drivers/media/video/em28xx/Kconfig" | 450 | source "drivers/media/video/em28xx/Kconfig" |
451 | 451 | ||
452 | config USB_DSBR | ||
453 | tristate "D-Link USB FM radio support (EXPERIMENTAL)" | ||
454 | depends on USB && VIDEO_V4L1 && EXPERIMENTAL | ||
455 | ---help--- | ||
456 | Say Y here if you want to connect this type of radio to your | ||
457 | computer's USB port. Note that the audio is not digital, and | ||
458 | you must connect the line out connector to a sound card or a | ||
459 | set of speakers. | ||
460 | |||
461 | To compile this driver as a module, choose M here: the | ||
462 | module will be called dsbr100. | ||
463 | |||
464 | source "drivers/media/video/usbvideo/Kconfig" | 452 | source "drivers/media/video/usbvideo/Kconfig" |
465 | 453 | ||
466 | source "drivers/media/video/et61x251/Kconfig" | 454 | source "drivers/media/video/et61x251/Kconfig" |
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index 353d61cfac1b..e82e511f2a72 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile | |||
@@ -77,7 +77,6 @@ obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o | |||
77 | obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o | 77 | obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o |
78 | 78 | ||
79 | obj-$(CONFIG_USB_DABUSB) += dabusb.o | 79 | obj-$(CONFIG_USB_DABUSB) += dabusb.o |
80 | obj-$(CONFIG_USB_DSBR) += dsbr100.o | ||
81 | obj-$(CONFIG_USB_OV511) += ov511.o | 80 | obj-$(CONFIG_USB_OV511) += ov511.o |
82 | obj-$(CONFIG_USB_SE401) += se401.o | 81 | obj-$(CONFIG_USB_SE401) += se401.o |
83 | obj-$(CONFIG_USB_STV680) += stv680.o | 82 | obj-$(CONFIG_USB_STV680) += stv680.o |
@@ -91,6 +90,7 @@ obj-$(CONFIG_USB_ZC0301) += zc0301/ | |||
91 | obj-$(CONFIG_USB_IBMCAM) += usbvideo/ | 90 | obj-$(CONFIG_USB_IBMCAM) += usbvideo/ |
92 | obj-$(CONFIG_USB_KONICAWC) += usbvideo/ | 91 | obj-$(CONFIG_USB_KONICAWC) += usbvideo/ |
93 | obj-$(CONFIG_USB_VICAM) += usbvideo/ | 92 | obj-$(CONFIG_USB_VICAM) += usbvideo/ |
93 | obj-$(CONFIG_USB_QUICKCAM_MESSENGER) += usbvideo/ | ||
94 | 94 | ||
95 | obj-$(CONFIG_VIDEO_VIVI) += vivi.o | 95 | obj-$(CONFIG_VIDEO_VIVI) += vivi.o |
96 | 96 | ||
diff --git a/drivers/media/video/compat_ioctl32.c b/drivers/media/video/compat_ioctl32.c index 9dddff42ec13..b69ee1194815 100644 --- a/drivers/media/video/compat_ioctl32.c +++ b/drivers/media/video/compat_ioctl32.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #ifdef CONFIG_COMPAT | 22 | #ifdef CONFIG_COMPAT |
23 | 23 | ||
24 | 24 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | |
25 | struct video_tuner32 { | 25 | struct video_tuner32 { |
26 | compat_int_t tuner; | 26 | compat_int_t tuner; |
27 | char name[32]; | 27 | char name[32]; |
@@ -107,6 +107,7 @@ struct video_window32 { | |||
107 | compat_caddr_t clips; | 107 | compat_caddr_t clips; |
108 | compat_int_t clipcount; | 108 | compat_int_t clipcount; |
109 | }; | 109 | }; |
110 | #endif | ||
110 | 111 | ||
111 | static int native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 112 | static int native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
112 | { | 113 | { |
@@ -124,6 +125,7 @@ static int native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
124 | } | 125 | } |
125 | 126 | ||
126 | 127 | ||
128 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
127 | /* You get back everything except the clips... */ | 129 | /* You get back everything except the clips... */ |
128 | static int put_video_window32(struct video_window *kp, struct video_window32 __user *up) | 130 | static int put_video_window32(struct video_window *kp, struct video_window32 __user *up) |
129 | { | 131 | { |
@@ -138,6 +140,7 @@ static int put_video_window32(struct video_window *kp, struct video_window32 __u | |||
138 | return -EFAULT; | 140 | return -EFAULT; |
139 | return 0; | 141 | return 0; |
140 | } | 142 | } |
143 | #endif | ||
141 | 144 | ||
142 | struct v4l2_clip32 | 145 | struct v4l2_clip32 |
143 | { | 146 | { |
@@ -490,6 +493,7 @@ static inline int put_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user | |||
490 | return 0; | 493 | return 0; |
491 | } | 494 | } |
492 | 495 | ||
496 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
493 | struct video_code32 | 497 | struct video_code32 |
494 | { | 498 | { |
495 | char loadwhat[16]; /* name or tag of file being passed */ | 499 | char loadwhat[16]; /* name or tag of file being passed */ |
@@ -517,6 +521,8 @@ static inline int microcode32(struct video_code *kp, struct video_code32 __user | |||
517 | #define VIDIOCSFREQ32 _IOW('v',15, u32) | 521 | #define VIDIOCSFREQ32 _IOW('v',15, u32) |
518 | #define VIDIOCSMICROCODE32 _IOW('v',27, struct video_code32) | 522 | #define VIDIOCSMICROCODE32 _IOW('v',27, struct video_code32) |
519 | 523 | ||
524 | #endif | ||
525 | |||
520 | /* VIDIOC_ENUMINPUT32 is VIDIOC_ENUMINPUT minus 4 bytes of padding alignement */ | 526 | /* VIDIOC_ENUMINPUT32 is VIDIOC_ENUMINPUT minus 4 bytes of padding alignement */ |
521 | #define VIDIOC_ENUMINPUT32 VIDIOC_ENUMINPUT - _IOC(0, 0, 0, 4) | 527 | #define VIDIOC_ENUMINPUT32 VIDIOC_ENUMINPUT - _IOC(0, 0, 0, 4) |
522 | #define VIDIOC_G_FMT32 _IOWR ('V', 4, struct v4l2_format32) | 528 | #define VIDIOC_G_FMT32 _IOWR ('V', 4, struct v4l2_format32) |
@@ -537,6 +543,7 @@ static inline int microcode32(struct video_code *kp, struct video_code32 __user | |||
537 | #define VIDIOC_S_INPUT32 _IOWR ('V', 39, compat_int_t) | 543 | #define VIDIOC_S_INPUT32 _IOWR ('V', 39, compat_int_t) |
538 | #define VIDIOC_TRY_FMT32 _IOWR ('V', 64, struct v4l2_format32) | 544 | #define VIDIOC_TRY_FMT32 _IOWR ('V', 64, struct v4l2_format32) |
539 | 545 | ||
546 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
540 | enum { | 547 | enum { |
541 | MaxClips = (~0U-sizeof(struct video_window))/sizeof(struct video_clip) | 548 | MaxClips = (~0U-sizeof(struct video_window))/sizeof(struct video_clip) |
542 | }; | 549 | }; |
@@ -601,14 +608,17 @@ static int do_set_window(struct file *file, unsigned int cmd, unsigned long arg) | |||
601 | 608 | ||
602 | return native_ioctl(file, VIDIOCSWIN, (unsigned long)vw); | 609 | return native_ioctl(file, VIDIOCSWIN, (unsigned long)vw); |
603 | } | 610 | } |
611 | #endif | ||
604 | 612 | ||
605 | static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 613 | static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
606 | { | 614 | { |
607 | union { | 615 | union { |
616 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
608 | struct video_tuner vt; | 617 | struct video_tuner vt; |
609 | struct video_buffer vb; | 618 | struct video_buffer vb; |
610 | struct video_window vw; | 619 | struct video_window vw; |
611 | struct video_code vc; | 620 | struct video_code vc; |
621 | #endif | ||
612 | struct v4l2_format v2f; | 622 | struct v4l2_format v2f; |
613 | struct v4l2_buffer v2b; | 623 | struct v4l2_buffer v2b; |
614 | struct v4l2_framebuffer v2fb; | 624 | struct v4l2_framebuffer v2fb; |
@@ -624,6 +634,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
624 | 634 | ||
625 | /* First, convert the command. */ | 635 | /* First, convert the command. */ |
626 | switch(cmd) { | 636 | switch(cmd) { |
637 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
627 | case VIDIOCGTUNER32: cmd = VIDIOCGTUNER; break; | 638 | case VIDIOCGTUNER32: cmd = VIDIOCGTUNER; break; |
628 | case VIDIOCSTUNER32: cmd = VIDIOCSTUNER; break; | 639 | case VIDIOCSTUNER32: cmd = VIDIOCSTUNER; break; |
629 | case VIDIOCGWIN32: cmd = VIDIOCGWIN; break; | 640 | case VIDIOCGWIN32: cmd = VIDIOCGWIN; break; |
@@ -631,6 +642,8 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
631 | case VIDIOCSFBUF32: cmd = VIDIOCSFBUF; break; | 642 | case VIDIOCSFBUF32: cmd = VIDIOCSFBUF; break; |
632 | case VIDIOCGFREQ32: cmd = VIDIOCGFREQ; break; | 643 | case VIDIOCGFREQ32: cmd = VIDIOCGFREQ; break; |
633 | case VIDIOCSFREQ32: cmd = VIDIOCSFREQ; break; | 644 | case VIDIOCSFREQ32: cmd = VIDIOCSFREQ; break; |
645 | case VIDIOCSMICROCODE32: cmd = VIDIOCSMICROCODE; break; | ||
646 | #endif | ||
634 | case VIDIOC_G_FMT32: cmd = VIDIOC_G_FMT; break; | 647 | case VIDIOC_G_FMT32: cmd = VIDIOC_G_FMT; break; |
635 | case VIDIOC_S_FMT32: cmd = VIDIOC_S_FMT; break; | 648 | case VIDIOC_S_FMT32: cmd = VIDIOC_S_FMT; break; |
636 | case VIDIOC_QUERYBUF32: cmd = VIDIOC_QUERYBUF; break; | 649 | case VIDIOC_QUERYBUF32: cmd = VIDIOC_QUERYBUF; break; |
@@ -647,10 +660,10 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
647 | case VIDIOC_G_INPUT32: cmd = VIDIOC_G_INPUT; break; | 660 | case VIDIOC_G_INPUT32: cmd = VIDIOC_G_INPUT; break; |
648 | case VIDIOC_S_INPUT32: cmd = VIDIOC_S_INPUT; break; | 661 | case VIDIOC_S_INPUT32: cmd = VIDIOC_S_INPUT; break; |
649 | case VIDIOC_TRY_FMT32: cmd = VIDIOC_TRY_FMT; break; | 662 | case VIDIOC_TRY_FMT32: cmd = VIDIOC_TRY_FMT; break; |
650 | case VIDIOCSMICROCODE32: cmd = VIDIOCSMICROCODE; break; | ||
651 | }; | 663 | }; |
652 | 664 | ||
653 | switch(cmd) { | 665 | switch(cmd) { |
666 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
654 | case VIDIOCSTUNER: | 667 | case VIDIOCSTUNER: |
655 | case VIDIOCGTUNER: | 668 | case VIDIOCGTUNER: |
656 | err = get_video_tuner32(&karg.vt, up); | 669 | err = get_video_tuner32(&karg.vt, up); |
@@ -664,6 +677,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
664 | break; | 677 | break; |
665 | 678 | ||
666 | case VIDIOCSFREQ: | 679 | case VIDIOCSFREQ: |
680 | #endif | ||
667 | case VIDIOC_S_INPUT: | 681 | case VIDIOC_S_INPUT: |
668 | case VIDIOC_OVERLAY: | 682 | case VIDIOC_OVERLAY: |
669 | case VIDIOC_STREAMON: | 683 | case VIDIOC_STREAMON: |
@@ -717,18 +731,21 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
717 | compatible_arg = 0; | 731 | compatible_arg = 0; |
718 | break; | 732 | break; |
719 | 733 | ||
734 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
720 | case VIDIOCGWIN: | 735 | case VIDIOCGWIN: |
721 | case VIDIOCGFBUF: | 736 | case VIDIOCGFBUF: |
722 | case VIDIOCGFREQ: | 737 | case VIDIOCGFREQ: |
738 | #endif | ||
723 | case VIDIOC_G_FBUF: | 739 | case VIDIOC_G_FBUF: |
724 | case VIDIOC_G_INPUT: | 740 | case VIDIOC_G_INPUT: |
725 | compatible_arg = 0; | 741 | compatible_arg = 0; |
742 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
726 | case VIDIOCSMICROCODE: | 743 | case VIDIOCSMICROCODE: |
727 | err = microcode32(&karg.vc, up); | 744 | err = microcode32(&karg.vc, up); |
728 | compatible_arg = 0; | 745 | compatible_arg = 0; |
729 | break; | 746 | break; |
747 | #endif | ||
730 | }; | 748 | }; |
731 | |||
732 | if(err) | 749 | if(err) |
733 | goto out; | 750 | goto out; |
734 | 751 | ||
@@ -743,6 +760,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
743 | } | 760 | } |
744 | if(err == 0) { | 761 | if(err == 0) { |
745 | switch(cmd) { | 762 | switch(cmd) { |
763 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
746 | case VIDIOCGTUNER: | 764 | case VIDIOCGTUNER: |
747 | err = put_video_tuner32(&karg.vt, up); | 765 | err = put_video_tuner32(&karg.vt, up); |
748 | break; | 766 | break; |
@@ -754,7 +772,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
754 | case VIDIOCGFBUF: | 772 | case VIDIOCGFBUF: |
755 | err = put_video_buffer32(&karg.vb, up); | 773 | err = put_video_buffer32(&karg.vb, up); |
756 | break; | 774 | break; |
757 | 775 | #endif | |
758 | case VIDIOC_G_FBUF: | 776 | case VIDIOC_G_FBUF: |
759 | err = put_v4l2_framebuffer32(&karg.v2fb, up); | 777 | err = put_v4l2_framebuffer32(&karg.v2fb, up); |
760 | break; | 778 | break; |
@@ -792,7 +810,9 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
792 | err = put_v4l2_input32(&karg.v2i, up); | 810 | err = put_v4l2_input32(&karg.v2i, up); |
793 | break; | 811 | break; |
794 | 812 | ||
813 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
795 | case VIDIOCGFREQ: | 814 | case VIDIOCGFREQ: |
815 | #endif | ||
796 | case VIDIOC_G_INPUT: | 816 | case VIDIOC_G_INPUT: |
797 | err = put_user(((u32)karg.vx), (u32 __user *)up); | 817 | err = put_user(((u32)karg.vx), (u32 __user *)up); |
798 | break; | 818 | break; |
@@ -810,6 +830,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
810 | return ret; | 830 | return ret; |
811 | 831 | ||
812 | switch (cmd) { | 832 | switch (cmd) { |
833 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
813 | case VIDIOCSWIN32: | 834 | case VIDIOCSWIN32: |
814 | ret = do_set_window(file, cmd, arg); | 835 | ret = do_set_window(file, cmd, arg); |
815 | break; | 836 | break; |
@@ -820,6 +841,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
820 | case VIDIOCSFBUF32: | 841 | case VIDIOCSFBUF32: |
821 | case VIDIOCGFREQ32: | 842 | case VIDIOCGFREQ32: |
822 | case VIDIOCSFREQ32: | 843 | case VIDIOCSFREQ32: |
844 | #endif | ||
823 | case VIDIOC_QUERYCAP: | 845 | case VIDIOC_QUERYCAP: |
824 | case VIDIOC_ENUM_FMT: | 846 | case VIDIOC_ENUM_FMT: |
825 | case VIDIOC_G_FMT32: | 847 | case VIDIOC_G_FMT32: |
@@ -851,6 +873,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
851 | ret = do_video_ioctl(file, cmd, arg); | 873 | ret = do_video_ioctl(file, cmd, arg); |
852 | break; | 874 | break; |
853 | 875 | ||
876 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
854 | /* Little v, the video4linux ioctls (conflict?) */ | 877 | /* Little v, the video4linux ioctls (conflict?) */ |
855 | case VIDIOCGCAP: | 878 | case VIDIOCGCAP: |
856 | case VIDIOCGCHAN: | 879 | case VIDIOCGCHAN: |
@@ -879,6 +902,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
879 | case _IOR('v' , BASE_VIDIOCPRIVATE+7, int): | 902 | case _IOR('v' , BASE_VIDIOCPRIVATE+7, int): |
880 | ret = native_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); | 903 | ret = native_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); |
881 | break; | 904 | break; |
905 | #endif | ||
882 | default: | 906 | default: |
883 | v4l_print_ioctl("compat_ioctl32", cmd); | 907 | v4l_print_ioctl("compat_ioctl32", cmd); |
884 | } | 908 | } |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 5c2036b40ea1..7bb7589a07c3 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -104,8 +104,8 @@ u32 cx25840_read4(struct i2c_client * client, u16 addr) | |||
104 | if (i2c_master_recv(client, buffer, 4) < 4) | 104 | if (i2c_master_recv(client, buffer, 4) < 4) |
105 | return 0; | 105 | return 0; |
106 | 106 | ||
107 | return (buffer[0] << 24) | (buffer[1] << 16) | | 107 | return (buffer[3] << 24) | (buffer[2] << 16) | |
108 | (buffer[2] << 8) | buffer[3]; | 108 | (buffer[1] << 8) | buffer[0]; |
109 | } | 109 | } |
110 | 110 | ||
111 | int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask, | 111 | int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask, |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 547cdbdb644d..94c92bacc342 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1225,7 +1225,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
1225 | struct v4l2_format *f = arg; | 1225 | struct v4l2_format *f = arg; |
1226 | return cx8800_try_fmt(dev,fh,f); | 1226 | return cx8800_try_fmt(dev,fh,f); |
1227 | } | 1227 | } |
1228 | #ifdef CONFIG_V4L1_COMPAT | 1228 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
1229 | /* --- streaming capture ------------------------------------- */ | 1229 | /* --- streaming capture ------------------------------------- */ |
1230 | case VIDIOCGMBUF: | 1230 | case VIDIOCGMBUF: |
1231 | { | 1231 | { |
@@ -1584,7 +1584,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file, | |||
1584 | *id = 0; | 1584 | *id = 0; |
1585 | return 0; | 1585 | return 0; |
1586 | } | 1586 | } |
1587 | #ifdef CONFIG_V4L1_COMPAT | 1587 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
1588 | case VIDIOCSTUNER: | 1588 | case VIDIOCSTUNER: |
1589 | { | 1589 | { |
1590 | struct video_tuner *v = arg; | 1590 | struct video_tuner *v = arg; |
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c index f2fd9195b3ac..ed02ff811388 100644 --- a/drivers/media/video/msp3400-kthreads.c +++ b/drivers/media/video/msp3400-kthreads.c | |||
@@ -961,10 +961,10 @@ int msp34xxg_thread(void *data) | |||
961 | /* setup the chip*/ | 961 | /* setup the chip*/ |
962 | msp34xxg_reset(client); | 962 | msp34xxg_reset(client); |
963 | state->std = state->radio ? 0x40 : msp_standard; | 963 | state->std = state->radio ? 0x40 : msp_standard; |
964 | if (state->std != 1) | ||
965 | goto unmute; | ||
966 | /* start autodetect */ | 964 | /* start autodetect */ |
967 | msp_write_dem(client, 0x20, state->std); | 965 | msp_write_dem(client, 0x20, state->std); |
966 | if (state->std != 1) | ||
967 | goto unmute; | ||
968 | 968 | ||
969 | /* watch autodetect */ | 969 | /* watch autodetect */ |
970 | v4l_dbg(1, msp_debug, client, "started autodetect, waiting for result\n"); | 970 | v4l_dbg(1, msp_debug, client, "started autodetect, waiting for result\n"); |
diff --git a/drivers/media/video/pwc/Kconfig b/drivers/media/video/pwc/Kconfig index 697145e0bf15..8fdf7101d3bf 100644 --- a/drivers/media/video/pwc/Kconfig +++ b/drivers/media/video/pwc/Kconfig | |||
@@ -30,7 +30,7 @@ config USB_PWC | |||
30 | 30 | ||
31 | config USB_PWC_DEBUG | 31 | config USB_PWC_DEBUG |
32 | bool "USB Philips Cameras verbose debug" | 32 | bool "USB Philips Cameras verbose debug" |
33 | depends USB_PWC | 33 | depends on USB_PWC |
34 | help | 34 | help |
35 | Say Y here in order to have the pwc driver generate verbose debugging | 35 | Say Y here in order to have the pwc driver generate verbose debugging |
36 | messages. | 36 | messages. |
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 47d0d83a0264..d4703944df9c 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -160,6 +160,7 @@ static struct file_operations pwc_fops = { | |||
160 | .poll = pwc_video_poll, | 160 | .poll = pwc_video_poll, |
161 | .mmap = pwc_video_mmap, | 161 | .mmap = pwc_video_mmap, |
162 | .ioctl = pwc_video_ioctl, | 162 | .ioctl = pwc_video_ioctl, |
163 | .compat_ioctl = v4l_compat_ioctl32, | ||
163 | .llseek = no_llseek, | 164 | .llseek = no_llseek, |
164 | }; | 165 | }; |
165 | static struct video_device pwc_template = { | 166 | static struct video_device pwc_template = { |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 8656f2400e18..2c171af9a9f2 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -2087,7 +2087,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
2087 | struct v4l2_format *f = arg; | 2087 | struct v4l2_format *f = arg; |
2088 | return saa7134_try_fmt(dev,fh,f); | 2088 | return saa7134_try_fmt(dev,fh,f); |
2089 | } | 2089 | } |
2090 | #ifdef CONFIG_V4L1_COMPAT | 2090 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
2091 | case VIDIOCGMBUF: | 2091 | case VIDIOCGMBUF: |
2092 | { | 2092 | { |
2093 | struct video_mbuf *mbuf = arg; | 2093 | struct video_mbuf *mbuf = arg; |
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c index a167e17c6dcd..d7eadc2c298d 100644 --- a/drivers/media/video/tuner-types.c +++ b/drivers/media/video/tuner-types.c | |||
@@ -1027,10 +1027,11 @@ static struct tuner_params tuner_tnf_5335mf_params[] = { | |||
1027 | /* 70-79 */ | 1027 | /* 70-79 */ |
1028 | /* ------------ TUNER_SAMSUNG_TCPN_2121P30A - Samsung NTSC ------------ */ | 1028 | /* ------------ TUNER_SAMSUNG_TCPN_2121P30A - Samsung NTSC ------------ */ |
1029 | 1029 | ||
1030 | /* '+ 4' turns on the Low Noise Amplifier */ | ||
1030 | static struct tuner_range tuner_samsung_tcpn_2121p30a_ntsc_ranges[] = { | 1031 | static struct tuner_range tuner_samsung_tcpn_2121p30a_ntsc_ranges[] = { |
1031 | { 16 * 130.00 /*MHz*/, 0xce, 0x01, }, | 1032 | { 16 * 130.00 /*MHz*/, 0xce, 0x01 + 4, }, |
1032 | { 16 * 364.50 /*MHz*/, 0xce, 0x02, }, | 1033 | { 16 * 364.50 /*MHz*/, 0xce, 0x02 + 4, }, |
1033 | { 16 * 999.99 , 0xce, 0x08, }, | 1034 | { 16 * 999.99 , 0xce, 0x08 + 4, }, |
1034 | }; | 1035 | }; |
1035 | 1036 | ||
1036 | static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { | 1037 | static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { |
@@ -1060,10 +1061,11 @@ static struct tuner_params tuner_thomson_fe6600_params[] = { | |||
1060 | 1061 | ||
1061 | /* ------------ TUNER_SAMSUNG_TCPG_6121P30A - Samsung PAL ------------ */ | 1062 | /* ------------ TUNER_SAMSUNG_TCPG_6121P30A - Samsung PAL ------------ */ |
1062 | 1063 | ||
1064 | /* '+ 4' turns on the Low Noise Amplifier */ | ||
1063 | static struct tuner_range tuner_samsung_tcpg_6121p30a_pal_ranges[] = { | 1065 | static struct tuner_range tuner_samsung_tcpg_6121p30a_pal_ranges[] = { |
1064 | { 16 * 146.25 /*MHz*/, 0xce, 0x01, }, | 1066 | { 16 * 146.25 /*MHz*/, 0xce, 0x01 + 4, }, |
1065 | { 16 * 428.50 /*MHz*/, 0xce, 0x02, }, | 1067 | { 16 * 428.50 /*MHz*/, 0xce, 0x02 + 4, }, |
1066 | { 16 * 999.99 , 0xce, 0x08, }, | 1068 | { 16 * 999.99 , 0xce, 0x08 + 4, }, |
1067 | }; | 1069 | }; |
1068 | 1070 | ||
1069 | static struct tuner_params tuner_samsung_tcpg_6121p30a_params[] = { | 1071 | static struct tuner_params tuner_samsung_tcpg_6121p30a_params[] = { |
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index d83a2c84d233..d7c3fcbc80f7 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c | |||
@@ -599,6 +599,10 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
599 | dprintk("VIDIOCGPICT / VIDIOC_G_FMT: %d\n",err); | 599 | dprintk("VIDIOCGPICT / VIDIOC_G_FMT: %d\n",err); |
600 | break; | 600 | break; |
601 | } | 601 | } |
602 | |||
603 | pict->depth = ((fmt2->fmt.pix.bytesperline<<3) | ||
604 | + (fmt2->fmt.pix.width-1) ) | ||
605 | /fmt2->fmt.pix.width; | ||
602 | pict->palette = pixelformat_to_palette( | 606 | pict->palette = pixelformat_to_palette( |
603 | fmt2->fmt.pix.pixelformat); | 607 | fmt2->fmt.pix.pixelformat); |
604 | break; | 608 | break; |
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 2ecbeffb559e..8d972ffdaf98 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -202,7 +202,7 @@ static char *v4l2_memory_names[] = { | |||
202 | /* ------------------------------------------------------------------ */ | 202 | /* ------------------------------------------------------------------ */ |
203 | /* debug help functions */ | 203 | /* debug help functions */ |
204 | 204 | ||
205 | #ifdef CONFIG_V4L1_COMPAT | 205 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
206 | static const char *v4l1_ioctls[] = { | 206 | static const char *v4l1_ioctls[] = { |
207 | [_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP", | 207 | [_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP", |
208 | [_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN", | 208 | [_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN", |
@@ -301,7 +301,7 @@ static const char *v4l2_ioctls[] = { | |||
301 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) | 301 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) |
302 | 302 | ||
303 | static const char *v4l2_int_ioctls[] = { | 303 | static const char *v4l2_int_ioctls[] = { |
304 | #ifdef CONFIG_V4L1_COMPAT | 304 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
305 | [_IOC_NR(DECODER_GET_CAPABILITIES)] = "DECODER_GET_CAPABILITIES", | 305 | [_IOC_NR(DECODER_GET_CAPABILITIES)] = "DECODER_GET_CAPABILITIES", |
306 | [_IOC_NR(DECODER_GET_STATUS)] = "DECODER_GET_STATUS", | 306 | [_IOC_NR(DECODER_GET_STATUS)] = "DECODER_GET_STATUS", |
307 | [_IOC_NR(DECODER_SET_NORM)] = "DECODER_SET_NORM", | 307 | [_IOC_NR(DECODER_SET_NORM)] = "DECODER_SET_NORM", |
@@ -367,7 +367,7 @@ void v4l_printk_ioctl(unsigned int cmd) | |||
367 | (_IOC_NR(cmd) < V4L2_INT_IOCTLS) ? | 367 | (_IOC_NR(cmd) < V4L2_INT_IOCTLS) ? |
368 | v4l2_int_ioctls[_IOC_NR(cmd)] : "UNKNOWN", dir, cmd); | 368 | v4l2_int_ioctls[_IOC_NR(cmd)] : "UNKNOWN", dir, cmd); |
369 | break; | 369 | break; |
370 | #ifdef CONFIG_V4L1_COMPAT | 370 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
371 | case 'v': | 371 | case 'v': |
372 | printk("v4l1 ioctl %s, dir=%s (0x%08x)\n", | 372 | printk("v4l1 ioctl %s, dir=%s (0x%08x)\n", |
373 | (_IOC_NR(cmd) < V4L1_IOCTLS) ? | 373 | (_IOC_NR(cmd) < V4L1_IOCTLS) ? |
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 0fc90cd393f6..88bf2af2a0e7 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -760,7 +760,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
760 | ret=vfd->vidioc_overlay(file, fh, *i); | 760 | ret=vfd->vidioc_overlay(file, fh, *i); |
761 | break; | 761 | break; |
762 | } | 762 | } |
763 | #ifdef CONFIG_V4L1_COMPAT | 763 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
764 | /* --- streaming capture ------------------------------------- */ | 764 | /* --- streaming capture ------------------------------------- */ |
765 | case VIDIOCGMBUF: | 765 | case VIDIOCGMBUF: |
766 | { | 766 | { |
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 38bd0c1018c2..841884af0cc0 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -986,7 +986,7 @@ static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *p) | |||
986 | file->f_flags & O_NONBLOCK)); | 986 | file->f_flags & O_NONBLOCK)); |
987 | } | 987 | } |
988 | 988 | ||
989 | #ifdef CONFIG_V4L1_COMPAT | 989 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
990 | static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf) | 990 | static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf) |
991 | { | 991 | { |
992 | struct vivi_fh *fh=priv; | 992 | struct vivi_fh *fh=priv; |
@@ -1328,7 +1328,7 @@ static struct video_device vivi = { | |||
1328 | .vidioc_s_ctrl = vidioc_s_ctrl, | 1328 | .vidioc_s_ctrl = vidioc_s_ctrl, |
1329 | .vidioc_streamon = vidioc_streamon, | 1329 | .vidioc_streamon = vidioc_streamon, |
1330 | .vidioc_streamoff = vidioc_streamoff, | 1330 | .vidioc_streamoff = vidioc_streamoff, |
1331 | #ifdef CONFIG_V4L1_COMPAT | 1331 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
1332 | .vidiocgmbuf = vidiocgmbuf, | 1332 | .vidiocgmbuf = vidiocgmbuf, |
1333 | #endif | 1333 | #endif |
1334 | .tvnorms = tvnorms, | 1334 | .tvnorms = tvnorms, |
diff --git a/drivers/mmc/mmc_queue.c b/drivers/mmc/mmc_queue.c index 0b9682e9a357..74f8cdeeff0f 100644 --- a/drivers/mmc/mmc_queue.c +++ b/drivers/mmc/mmc_queue.c | |||
@@ -79,7 +79,8 @@ static int mmc_queue_thread(void *d) | |||
79 | spin_lock_irq(q->queue_lock); | 79 | spin_lock_irq(q->queue_lock); |
80 | set_current_state(TASK_INTERRUPTIBLE); | 80 | set_current_state(TASK_INTERRUPTIBLE); |
81 | if (!blk_queue_plugged(q)) | 81 | if (!blk_queue_plugged(q)) |
82 | mq->req = req = elv_next_request(q); | 82 | req = elv_next_request(q); |
83 | mq->req = req; | ||
83 | spin_unlock_irq(q->queue_lock); | 84 | spin_unlock_irq(q->queue_lock); |
84 | 85 | ||
85 | if (!req) { | 86 | if (!req) { |
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 8a30ef3ae419..c351c6d1a18a 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include "wbsd.h" | 41 | #include "wbsd.h" |
42 | 42 | ||
43 | #define DRIVER_NAME "wbsd" | 43 | #define DRIVER_NAME "wbsd" |
44 | #define DRIVER_VERSION "1.5" | 44 | #define DRIVER_VERSION "1.6" |
45 | 45 | ||
46 | #define DBG(x...) \ | 46 | #define DBG(x...) \ |
47 | pr_debug(DRIVER_NAME ": " x) | 47 | pr_debug(DRIVER_NAME ": " x) |
@@ -1439,13 +1439,13 @@ static int __devinit wbsd_scan(struct wbsd_host *host) | |||
1439 | 1439 | ||
1440 | static int __devinit wbsd_request_region(struct wbsd_host *host, int base) | 1440 | static int __devinit wbsd_request_region(struct wbsd_host *host, int base) |
1441 | { | 1441 | { |
1442 | if (io & 0x7) | 1442 | if (base & 0x7) |
1443 | return -EINVAL; | 1443 | return -EINVAL; |
1444 | 1444 | ||
1445 | if (!request_region(base, 8, DRIVER_NAME)) | 1445 | if (!request_region(base, 8, DRIVER_NAME)) |
1446 | return -EIO; | 1446 | return -EIO; |
1447 | 1447 | ||
1448 | host->base = io; | 1448 | host->base = base; |
1449 | 1449 | ||
1450 | return 0; | 1450 | return 0; |
1451 | } | 1451 | } |
@@ -1773,7 +1773,7 @@ static int __devinit wbsd_init(struct device *dev, int base, int irq, int dma, | |||
1773 | /* | 1773 | /* |
1774 | * Request resources. | 1774 | * Request resources. |
1775 | */ | 1775 | */ |
1776 | ret = wbsd_request_resources(host, io, irq, dma); | 1776 | ret = wbsd_request_resources(host, base, irq, dma); |
1777 | if (ret) { | 1777 | if (ret) { |
1778 | wbsd_release_resources(host); | 1778 | wbsd_release_resources(host); |
1779 | wbsd_free_mmc(dev); | 1779 | wbsd_free_mmc(dev); |
@@ -1861,6 +1861,7 @@ static void __devexit wbsd_shutdown(struct device *dev, int pnp) | |||
1861 | 1861 | ||
1862 | static int __devinit wbsd_probe(struct platform_device *dev) | 1862 | static int __devinit wbsd_probe(struct platform_device *dev) |
1863 | { | 1863 | { |
1864 | /* Use the module parameters for resources */ | ||
1864 | return wbsd_init(&dev->dev, io, irq, dma, 0); | 1865 | return wbsd_init(&dev->dev, io, irq, dma, 0); |
1865 | } | 1866 | } |
1866 | 1867 | ||
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index db73de0d2511..652eb05a6c2d 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -56,8 +56,8 @@ | |||
56 | 56 | ||
57 | #define DRV_MODULE_NAME "bnx2" | 57 | #define DRV_MODULE_NAME "bnx2" |
58 | #define PFX DRV_MODULE_NAME ": " | 58 | #define PFX DRV_MODULE_NAME ": " |
59 | #define DRV_MODULE_VERSION "1.4.43" | 59 | #define DRV_MODULE_VERSION "1.4.44" |
60 | #define DRV_MODULE_RELDATE "June 28, 2006" | 60 | #define DRV_MODULE_RELDATE "August 10, 2006" |
61 | 61 | ||
62 | #define RUN_AT(x) (jiffies + (x)) | 62 | #define RUN_AT(x) (jiffies + (x)) |
63 | 63 | ||
@@ -209,8 +209,10 @@ MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl); | |||
209 | 209 | ||
210 | static inline u32 bnx2_tx_avail(struct bnx2 *bp) | 210 | static inline u32 bnx2_tx_avail(struct bnx2 *bp) |
211 | { | 211 | { |
212 | u32 diff = TX_RING_IDX(bp->tx_prod) - TX_RING_IDX(bp->tx_cons); | 212 | u32 diff; |
213 | 213 | ||
214 | smp_mb(); | ||
215 | diff = TX_RING_IDX(bp->tx_prod) - TX_RING_IDX(bp->tx_cons); | ||
214 | if (diff > MAX_TX_DESC_CNT) | 216 | if (diff > MAX_TX_DESC_CNT) |
215 | diff = (diff & MAX_TX_DESC_CNT) - 1; | 217 | diff = (diff & MAX_TX_DESC_CNT) - 1; |
216 | return (bp->tx_ring_size - diff); | 218 | return (bp->tx_ring_size - diff); |
@@ -1569,7 +1571,7 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index) | |||
1569 | struct rx_bd *rxbd = &bp->rx_desc_ring[RX_RING(index)][RX_IDX(index)]; | 1571 | struct rx_bd *rxbd = &bp->rx_desc_ring[RX_RING(index)][RX_IDX(index)]; |
1570 | unsigned long align; | 1572 | unsigned long align; |
1571 | 1573 | ||
1572 | skb = dev_alloc_skb(bp->rx_buf_size); | 1574 | skb = netdev_alloc_skb(bp->dev, bp->rx_buf_size); |
1573 | if (skb == NULL) { | 1575 | if (skb == NULL) { |
1574 | return -ENOMEM; | 1576 | return -ENOMEM; |
1575 | } | 1577 | } |
@@ -1578,7 +1580,6 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index) | |||
1578 | skb_reserve(skb, 8 - align); | 1580 | skb_reserve(skb, 8 - align); |
1579 | } | 1581 | } |
1580 | 1582 | ||
1581 | skb->dev = bp->dev; | ||
1582 | mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_use_size, | 1583 | mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_use_size, |
1583 | PCI_DMA_FROMDEVICE); | 1584 | PCI_DMA_FROMDEVICE); |
1584 | 1585 | ||
@@ -1686,15 +1687,20 @@ bnx2_tx_int(struct bnx2 *bp) | |||
1686 | } | 1687 | } |
1687 | 1688 | ||
1688 | bp->tx_cons = sw_cons; | 1689 | bp->tx_cons = sw_cons; |
1690 | /* Need to make the tx_cons update visible to bnx2_start_xmit() | ||
1691 | * before checking for netif_queue_stopped(). Without the | ||
1692 | * memory barrier, there is a small possibility that bnx2_start_xmit() | ||
1693 | * will miss it and cause the queue to be stopped forever. | ||
1694 | */ | ||
1695 | smp_mb(); | ||
1689 | 1696 | ||
1690 | if (unlikely(netif_queue_stopped(bp->dev))) { | 1697 | if (unlikely(netif_queue_stopped(bp->dev)) && |
1691 | spin_lock(&bp->tx_lock); | 1698 | (bnx2_tx_avail(bp) > bp->tx_wake_thresh)) { |
1699 | netif_tx_lock(bp->dev); | ||
1692 | if ((netif_queue_stopped(bp->dev)) && | 1700 | if ((netif_queue_stopped(bp->dev)) && |
1693 | (bnx2_tx_avail(bp) > MAX_SKB_FRAGS)) { | 1701 | (bnx2_tx_avail(bp) > bp->tx_wake_thresh)) |
1694 | |||
1695 | netif_wake_queue(bp->dev); | 1702 | netif_wake_queue(bp->dev); |
1696 | } | 1703 | netif_tx_unlock(bp->dev); |
1697 | spin_unlock(&bp->tx_lock); | ||
1698 | } | 1704 | } |
1699 | } | 1705 | } |
1700 | 1706 | ||
@@ -1786,7 +1792,7 @@ bnx2_rx_int(struct bnx2 *bp, int budget) | |||
1786 | if ((bp->dev->mtu > 1500) && (len <= RX_COPY_THRESH)) { | 1792 | if ((bp->dev->mtu > 1500) && (len <= RX_COPY_THRESH)) { |
1787 | struct sk_buff *new_skb; | 1793 | struct sk_buff *new_skb; |
1788 | 1794 | ||
1789 | new_skb = dev_alloc_skb(len + 2); | 1795 | new_skb = netdev_alloc_skb(bp->dev, len + 2); |
1790 | if (new_skb == NULL) | 1796 | if (new_skb == NULL) |
1791 | goto reuse_rx; | 1797 | goto reuse_rx; |
1792 | 1798 | ||
@@ -1797,7 +1803,6 @@ bnx2_rx_int(struct bnx2 *bp, int budget) | |||
1797 | 1803 | ||
1798 | skb_reserve(new_skb, 2); | 1804 | skb_reserve(new_skb, 2); |
1799 | skb_put(new_skb, len); | 1805 | skb_put(new_skb, len); |
1800 | new_skb->dev = bp->dev; | ||
1801 | 1806 | ||
1802 | bnx2_reuse_rx_skb(bp, skb, | 1807 | bnx2_reuse_rx_skb(bp, skb, |
1803 | sw_ring_cons, sw_ring_prod); | 1808 | sw_ring_cons, sw_ring_prod); |
@@ -3503,6 +3508,8 @@ bnx2_init_tx_ring(struct bnx2 *bp) | |||
3503 | struct tx_bd *txbd; | 3508 | struct tx_bd *txbd; |
3504 | u32 val; | 3509 | u32 val; |
3505 | 3510 | ||
3511 | bp->tx_wake_thresh = bp->tx_ring_size / 2; | ||
3512 | |||
3506 | txbd = &bp->tx_desc_ring[MAX_TX_DESC_CNT]; | 3513 | txbd = &bp->tx_desc_ring[MAX_TX_DESC_CNT]; |
3507 | 3514 | ||
3508 | txbd->tx_bd_haddr_hi = (u64) bp->tx_desc_mapping >> 32; | 3515 | txbd->tx_bd_haddr_hi = (u64) bp->tx_desc_mapping >> 32; |
@@ -3952,7 +3959,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode) | |||
3952 | return -EINVAL; | 3959 | return -EINVAL; |
3953 | 3960 | ||
3954 | pkt_size = 1514; | 3961 | pkt_size = 1514; |
3955 | skb = dev_alloc_skb(pkt_size); | 3962 | skb = netdev_alloc_skb(bp->dev, pkt_size); |
3956 | if (!skb) | 3963 | if (!skb) |
3957 | return -ENOMEM; | 3964 | return -ENOMEM; |
3958 | packet = skb_put(skb, pkt_size); | 3965 | packet = skb_put(skb, pkt_size); |
@@ -4390,10 +4397,8 @@ bnx2_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid) | |||
4390 | #endif | 4397 | #endif |
4391 | 4398 | ||
4392 | /* Called with netif_tx_lock. | 4399 | /* Called with netif_tx_lock. |
4393 | * hard_start_xmit is pseudo-lockless - a lock is only required when | 4400 | * bnx2_tx_int() runs without netif_tx_lock unless it needs to call |
4394 | * the tx queue is full. This way, we get the benefit of lockless | 4401 | * netif_wake_queue(). |
4395 | * operations most of the time without the complexities to handle | ||
4396 | * netif_stop_queue/wake_queue race conditions. | ||
4397 | */ | 4402 | */ |
4398 | static int | 4403 | static int |
4399 | bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | 4404 | bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) |
@@ -4512,12 +4517,9 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4512 | dev->trans_start = jiffies; | 4517 | dev->trans_start = jiffies; |
4513 | 4518 | ||
4514 | if (unlikely(bnx2_tx_avail(bp) <= MAX_SKB_FRAGS)) { | 4519 | if (unlikely(bnx2_tx_avail(bp) <= MAX_SKB_FRAGS)) { |
4515 | spin_lock(&bp->tx_lock); | ||
4516 | netif_stop_queue(dev); | 4520 | netif_stop_queue(dev); |
4517 | 4521 | if (bnx2_tx_avail(bp) > bp->tx_wake_thresh) | |
4518 | if (bnx2_tx_avail(bp) > MAX_SKB_FRAGS) | ||
4519 | netif_wake_queue(dev); | 4522 | netif_wake_queue(dev); |
4520 | spin_unlock(&bp->tx_lock); | ||
4521 | } | 4523 | } |
4522 | 4524 | ||
4523 | return NETDEV_TX_OK; | 4525 | return NETDEV_TX_OK; |
@@ -5628,7 +5630,6 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
5628 | bp->pdev = pdev; | 5630 | bp->pdev = pdev; |
5629 | 5631 | ||
5630 | spin_lock_init(&bp->phy_lock); | 5632 | spin_lock_init(&bp->phy_lock); |
5631 | spin_lock_init(&bp->tx_lock); | ||
5632 | INIT_WORK(&bp->reset_task, bnx2_reset_task, bp); | 5633 | INIT_WORK(&bp->reset_task, bnx2_reset_task, bp); |
5633 | 5634 | ||
5634 | dev->base_addr = dev->mem_start = pci_resource_start(pdev, 0); | 5635 | dev->base_addr = dev->mem_start = pci_resource_start(pdev, 0); |
@@ -5751,7 +5752,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
5751 | bp->mac_addr[5] = (u8) reg; | 5752 | bp->mac_addr[5] = (u8) reg; |
5752 | 5753 | ||
5753 | bp->tx_ring_size = MAX_TX_DESC_CNT; | 5754 | bp->tx_ring_size = MAX_TX_DESC_CNT; |
5754 | bnx2_set_rx_ring_size(bp, 100); | 5755 | bnx2_set_rx_ring_size(bp, 255); |
5755 | 5756 | ||
5756 | bp->rx_csum = 1; | 5757 | bp->rx_csum = 1; |
5757 | 5758 | ||
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 658c5ee95c73..fe804763c607 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -3890,10 +3890,6 @@ struct bnx2 { | |||
3890 | u32 tx_prod_bseq __attribute__((aligned(L1_CACHE_BYTES))); | 3890 | u32 tx_prod_bseq __attribute__((aligned(L1_CACHE_BYTES))); |
3891 | u16 tx_prod; | 3891 | u16 tx_prod; |
3892 | 3892 | ||
3893 | struct tx_bd *tx_desc_ring; | ||
3894 | struct sw_bd *tx_buf_ring; | ||
3895 | int tx_ring_size; | ||
3896 | |||
3897 | u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); | 3893 | u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); |
3898 | u16 hw_tx_cons; | 3894 | u16 hw_tx_cons; |
3899 | 3895 | ||
@@ -3916,9 +3912,11 @@ struct bnx2 { | |||
3916 | struct sw_bd *rx_buf_ring; | 3912 | struct sw_bd *rx_buf_ring; |
3917 | struct rx_bd *rx_desc_ring[MAX_RX_RINGS]; | 3913 | struct rx_bd *rx_desc_ring[MAX_RX_RINGS]; |
3918 | 3914 | ||
3919 | /* Only used to synchronize netif_stop_queue/wake_queue when tx */ | 3915 | /* TX constants */ |
3920 | /* ring is full */ | 3916 | struct tx_bd *tx_desc_ring; |
3921 | spinlock_t tx_lock; | 3917 | struct sw_bd *tx_buf_ring; |
3918 | int tx_ring_size; | ||
3919 | u32 tx_wake_thresh; | ||
3922 | 3920 | ||
3923 | /* End of fields used in the performance code paths. */ | 3921 | /* End of fields used in the performance code paths. */ |
3924 | 3922 | ||
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 0ec6e9d57b94..c872f7c6cce3 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -192,7 +192,7 @@ struct cardmap { | |||
192 | void *ptr[CARDMAP_WIDTH]; | 192 | void *ptr[CARDMAP_WIDTH]; |
193 | }; | 193 | }; |
194 | static void *cardmap_get(struct cardmap *map, unsigned int nr); | 194 | static void *cardmap_get(struct cardmap *map, unsigned int nr); |
195 | static void cardmap_set(struct cardmap **map, unsigned int nr, void *ptr); | 195 | static int cardmap_set(struct cardmap **map, unsigned int nr, void *ptr); |
196 | static unsigned int cardmap_find_first_free(struct cardmap *map); | 196 | static unsigned int cardmap_find_first_free(struct cardmap *map); |
197 | static void cardmap_destroy(struct cardmap **map); | 197 | static void cardmap_destroy(struct cardmap **map); |
198 | 198 | ||
@@ -1995,10 +1995,9 @@ ppp_register_channel(struct ppp_channel *chan) | |||
1995 | { | 1995 | { |
1996 | struct channel *pch; | 1996 | struct channel *pch; |
1997 | 1997 | ||
1998 | pch = kmalloc(sizeof(struct channel), GFP_KERNEL); | 1998 | pch = kzalloc(sizeof(struct channel), GFP_KERNEL); |
1999 | if (pch == 0) | 1999 | if (pch == 0) |
2000 | return -ENOMEM; | 2000 | return -ENOMEM; |
2001 | memset(pch, 0, sizeof(struct channel)); | ||
2002 | pch->ppp = NULL; | 2001 | pch->ppp = NULL; |
2003 | pch->chan = chan; | 2002 | pch->chan = chan; |
2004 | chan->ppp = pch; | 2003 | chan->ppp = pch; |
@@ -2408,13 +2407,12 @@ ppp_create_interface(int unit, int *retp) | |||
2408 | int ret = -ENOMEM; | 2407 | int ret = -ENOMEM; |
2409 | int i; | 2408 | int i; |
2410 | 2409 | ||
2411 | ppp = kmalloc(sizeof(struct ppp), GFP_KERNEL); | 2410 | ppp = kzalloc(sizeof(struct ppp), GFP_KERNEL); |
2412 | if (!ppp) | 2411 | if (!ppp) |
2413 | goto out; | 2412 | goto out; |
2414 | dev = alloc_netdev(0, "", ppp_setup); | 2413 | dev = alloc_netdev(0, "", ppp_setup); |
2415 | if (!dev) | 2414 | if (!dev) |
2416 | goto out1; | 2415 | goto out1; |
2417 | memset(ppp, 0, sizeof(struct ppp)); | ||
2418 | 2416 | ||
2419 | ppp->mru = PPP_MRU; | 2417 | ppp->mru = PPP_MRU; |
2420 | init_ppp_file(&ppp->file, INTERFACE); | 2418 | init_ppp_file(&ppp->file, INTERFACE); |
@@ -2454,11 +2452,16 @@ ppp_create_interface(int unit, int *retp) | |||
2454 | } | 2452 | } |
2455 | 2453 | ||
2456 | atomic_inc(&ppp_unit_count); | 2454 | atomic_inc(&ppp_unit_count); |
2457 | cardmap_set(&all_ppp_units, unit, ppp); | 2455 | ret = cardmap_set(&all_ppp_units, unit, ppp); |
2456 | if (ret != 0) | ||
2457 | goto out3; | ||
2458 | |||
2458 | mutex_unlock(&all_ppp_mutex); | 2459 | mutex_unlock(&all_ppp_mutex); |
2459 | *retp = 0; | 2460 | *retp = 0; |
2460 | return ppp; | 2461 | return ppp; |
2461 | 2462 | ||
2463 | out3: | ||
2464 | atomic_dec(&ppp_unit_count); | ||
2462 | out2: | 2465 | out2: |
2463 | mutex_unlock(&all_ppp_mutex); | 2466 | mutex_unlock(&all_ppp_mutex); |
2464 | free_netdev(dev); | 2467 | free_netdev(dev); |
@@ -2695,7 +2698,7 @@ static void *cardmap_get(struct cardmap *map, unsigned int nr) | |||
2695 | return NULL; | 2698 | return NULL; |
2696 | } | 2699 | } |
2697 | 2700 | ||
2698 | static void cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) | 2701 | static int cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) |
2699 | { | 2702 | { |
2700 | struct cardmap *p; | 2703 | struct cardmap *p; |
2701 | int i; | 2704 | int i; |
@@ -2704,8 +2707,9 @@ static void cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) | |||
2704 | if (p == NULL || (nr >> p->shift) >= CARDMAP_WIDTH) { | 2707 | if (p == NULL || (nr >> p->shift) >= CARDMAP_WIDTH) { |
2705 | do { | 2708 | do { |
2706 | /* need a new top level */ | 2709 | /* need a new top level */ |
2707 | struct cardmap *np = kmalloc(sizeof(*np), GFP_KERNEL); | 2710 | struct cardmap *np = kzalloc(sizeof(*np), GFP_KERNEL); |
2708 | memset(np, 0, sizeof(*np)); | 2711 | if (!np) |
2712 | goto enomem; | ||
2709 | np->ptr[0] = p; | 2713 | np->ptr[0] = p; |
2710 | if (p != NULL) { | 2714 | if (p != NULL) { |
2711 | np->shift = p->shift + CARDMAP_ORDER; | 2715 | np->shift = p->shift + CARDMAP_ORDER; |
@@ -2719,8 +2723,9 @@ static void cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) | |||
2719 | while (p->shift > 0) { | 2723 | while (p->shift > 0) { |
2720 | i = (nr >> p->shift) & CARDMAP_MASK; | 2724 | i = (nr >> p->shift) & CARDMAP_MASK; |
2721 | if (p->ptr[i] == NULL) { | 2725 | if (p->ptr[i] == NULL) { |
2722 | struct cardmap *np = kmalloc(sizeof(*np), GFP_KERNEL); | 2726 | struct cardmap *np = kzalloc(sizeof(*np), GFP_KERNEL); |
2723 | memset(np, 0, sizeof(*np)); | 2727 | if (!np) |
2728 | goto enomem; | ||
2724 | np->shift = p->shift - CARDMAP_ORDER; | 2729 | np->shift = p->shift - CARDMAP_ORDER; |
2725 | np->parent = p; | 2730 | np->parent = p; |
2726 | p->ptr[i] = np; | 2731 | p->ptr[i] = np; |
@@ -2735,6 +2740,9 @@ static void cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) | |||
2735 | set_bit(i, &p->inuse); | 2740 | set_bit(i, &p->inuse); |
2736 | else | 2741 | else |
2737 | clear_bit(i, &p->inuse); | 2742 | clear_bit(i, &p->inuse); |
2743 | return 0; | ||
2744 | enomem: | ||
2745 | return -ENOMEM; | ||
2738 | } | 2746 | } |
2739 | 2747 | ||
2740 | static unsigned int cardmap_find_first_free(struct cardmap *map) | 2748 | static unsigned int cardmap_find_first_free(struct cardmap *map) |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6f97962dd06b..eafabb253f08 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.64" | 71 | #define DRV_MODULE_VERSION "3.65" |
72 | #define DRV_MODULE_RELDATE "July 31, 2006" | 72 | #define DRV_MODULE_RELDATE "August 07, 2006" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -123,9 +123,6 @@ | |||
123 | TG3_RX_RCB_RING_SIZE(tp)) | 123 | TG3_RX_RCB_RING_SIZE(tp)) |
124 | #define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \ | 124 | #define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \ |
125 | TG3_TX_RING_SIZE) | 125 | TG3_TX_RING_SIZE) |
126 | #define TX_BUFFS_AVAIL(TP) \ | ||
127 | ((TP)->tx_pending - \ | ||
128 | (((TP)->tx_prod - (TP)->tx_cons) & (TG3_TX_RING_SIZE - 1))) | ||
129 | #define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) | 126 | #define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) |
130 | 127 | ||
131 | #define RX_PKT_BUF_SZ (1536 + tp->rx_offset + 64) | 128 | #define RX_PKT_BUF_SZ (1536 + tp->rx_offset + 64) |
@@ -2987,6 +2984,13 @@ static void tg3_tx_recover(struct tg3 *tp) | |||
2987 | spin_unlock(&tp->lock); | 2984 | spin_unlock(&tp->lock); |
2988 | } | 2985 | } |
2989 | 2986 | ||
2987 | static inline u32 tg3_tx_avail(struct tg3 *tp) | ||
2988 | { | ||
2989 | smp_mb(); | ||
2990 | return (tp->tx_pending - | ||
2991 | ((tp->tx_prod - tp->tx_cons) & (TG3_TX_RING_SIZE - 1))); | ||
2992 | } | ||
2993 | |||
2990 | /* Tigon3 never reports partial packet sends. So we do not | 2994 | /* Tigon3 never reports partial packet sends. So we do not |
2991 | * need special logic to handle SKBs that have not had all | 2995 | * need special logic to handle SKBs that have not had all |
2992 | * of their frags sent yet, like SunGEM does. | 2996 | * of their frags sent yet, like SunGEM does. |
@@ -3038,12 +3042,20 @@ static void tg3_tx(struct tg3 *tp) | |||
3038 | 3042 | ||
3039 | tp->tx_cons = sw_idx; | 3043 | tp->tx_cons = sw_idx; |
3040 | 3044 | ||
3041 | if (unlikely(netif_queue_stopped(tp->dev))) { | 3045 | /* Need to make the tx_cons update visible to tg3_start_xmit() |
3042 | spin_lock(&tp->tx_lock); | 3046 | * before checking for netif_queue_stopped(). Without the |
3047 | * memory barrier, there is a small possibility that tg3_start_xmit() | ||
3048 | * will miss it and cause the queue to be stopped forever. | ||
3049 | */ | ||
3050 | smp_mb(); | ||
3051 | |||
3052 | if (unlikely(netif_queue_stopped(tp->dev) && | ||
3053 | (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH))) { | ||
3054 | netif_tx_lock(tp->dev); | ||
3043 | if (netif_queue_stopped(tp->dev) && | 3055 | if (netif_queue_stopped(tp->dev) && |
3044 | (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH)) | 3056 | (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH)) |
3045 | netif_wake_queue(tp->dev); | 3057 | netif_wake_queue(tp->dev); |
3046 | spin_unlock(&tp->tx_lock); | 3058 | netif_tx_unlock(tp->dev); |
3047 | } | 3059 | } |
3048 | } | 3060 | } |
3049 | 3061 | ||
@@ -3101,7 +3113,6 @@ static int tg3_alloc_rx_skb(struct tg3 *tp, u32 opaque_key, | |||
3101 | if (skb == NULL) | 3113 | if (skb == NULL) |
3102 | return -ENOMEM; | 3114 | return -ENOMEM; |
3103 | 3115 | ||
3104 | skb->dev = tp->dev; | ||
3105 | skb_reserve(skb, tp->rx_offset); | 3116 | skb_reserve(skb, tp->rx_offset); |
3106 | 3117 | ||
3107 | mapping = pci_map_single(tp->pdev, skb->data, | 3118 | mapping = pci_map_single(tp->pdev, skb->data, |
@@ -3274,7 +3285,6 @@ static int tg3_rx(struct tg3 *tp, int budget) | |||
3274 | if (copy_skb == NULL) | 3285 | if (copy_skb == NULL) |
3275 | goto drop_it_no_recycle; | 3286 | goto drop_it_no_recycle; |
3276 | 3287 | ||
3277 | copy_skb->dev = tp->dev; | ||
3278 | skb_reserve(copy_skb, 2); | 3288 | skb_reserve(copy_skb, 2); |
3279 | skb_put(copy_skb, len); | 3289 | skb_put(copy_skb, len); |
3280 | pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); | 3290 | pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); |
@@ -3797,7 +3807,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3797 | * interrupt. Furthermore, IRQ processing runs lockless so we have | 3807 | * interrupt. Furthermore, IRQ processing runs lockless so we have |
3798 | * no IRQ context deadlocks to worry about either. Rejoice! | 3808 | * no IRQ context deadlocks to worry about either. Rejoice! |
3799 | */ | 3809 | */ |
3800 | if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { | 3810 | if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { |
3801 | if (!netif_queue_stopped(dev)) { | 3811 | if (!netif_queue_stopped(dev)) { |
3802 | netif_stop_queue(dev); | 3812 | netif_stop_queue(dev); |
3803 | 3813 | ||
@@ -3893,12 +3903,10 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3893 | tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); | 3903 | tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); |
3894 | 3904 | ||
3895 | tp->tx_prod = entry; | 3905 | tp->tx_prod = entry; |
3896 | if (unlikely(TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1))) { | 3906 | if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) { |
3897 | spin_lock(&tp->tx_lock); | ||
3898 | netif_stop_queue(dev); | 3907 | netif_stop_queue(dev); |
3899 | if (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH) | 3908 | if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH) |
3900 | netif_wake_queue(tp->dev); | 3909 | netif_wake_queue(tp->dev); |
3901 | spin_unlock(&tp->tx_lock); | ||
3902 | } | 3910 | } |
3903 | 3911 | ||
3904 | out_unlock: | 3912 | out_unlock: |
@@ -3920,7 +3928,7 @@ static int tg3_tso_bug(struct tg3 *tp, struct sk_buff *skb) | |||
3920 | struct sk_buff *segs, *nskb; | 3928 | struct sk_buff *segs, *nskb; |
3921 | 3929 | ||
3922 | /* Estimate the number of fragments in the worst case */ | 3930 | /* Estimate the number of fragments in the worst case */ |
3923 | if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->gso_segs * 3))) { | 3931 | if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->gso_segs * 3))) { |
3924 | netif_stop_queue(tp->dev); | 3932 | netif_stop_queue(tp->dev); |
3925 | return NETDEV_TX_BUSY; | 3933 | return NETDEV_TX_BUSY; |
3926 | } | 3934 | } |
@@ -3960,7 +3968,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
3960 | * interrupt. Furthermore, IRQ processing runs lockless so we have | 3968 | * interrupt. Furthermore, IRQ processing runs lockless so we have |
3961 | * no IRQ context deadlocks to worry about either. Rejoice! | 3969 | * no IRQ context deadlocks to worry about either. Rejoice! |
3962 | */ | 3970 | */ |
3963 | if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { | 3971 | if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { |
3964 | if (!netif_queue_stopped(dev)) { | 3972 | if (!netif_queue_stopped(dev)) { |
3965 | netif_stop_queue(dev); | 3973 | netif_stop_queue(dev); |
3966 | 3974 | ||
@@ -4110,12 +4118,10 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
4110 | tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); | 4118 | tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); |
4111 | 4119 | ||
4112 | tp->tx_prod = entry; | 4120 | tp->tx_prod = entry; |
4113 | if (unlikely(TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1))) { | 4121 | if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) { |
4114 | spin_lock(&tp->tx_lock); | ||
4115 | netif_stop_queue(dev); | 4122 | netif_stop_queue(dev); |
4116 | if (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH) | 4123 | if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH) |
4117 | netif_wake_queue(tp->dev); | 4124 | netif_wake_queue(tp->dev); |
4118 | spin_unlock(&tp->tx_lock); | ||
4119 | } | 4125 | } |
4120 | 4126 | ||
4121 | out_unlock: | 4127 | out_unlock: |
@@ -11474,7 +11480,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11474 | tp->grc_mode |= GRC_MODE_BSWAP_NONFRM_DATA; | 11480 | tp->grc_mode |= GRC_MODE_BSWAP_NONFRM_DATA; |
11475 | #endif | 11481 | #endif |
11476 | spin_lock_init(&tp->lock); | 11482 | spin_lock_init(&tp->lock); |
11477 | spin_lock_init(&tp->tx_lock); | ||
11478 | spin_lock_init(&tp->indirect_lock); | 11483 | spin_lock_init(&tp->indirect_lock); |
11479 | INIT_WORK(&tp->reset_task, tg3_reset_task, tp); | 11484 | INIT_WORK(&tp->reset_task, tg3_reset_task, tp); |
11480 | 11485 | ||
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index ba2c98711c88..3ecf356cfb08 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2079,9 +2079,9 @@ struct tg3 { | |||
2079 | * lock: Held during reset, PHY access, timer, and when | 2079 | * lock: Held during reset, PHY access, timer, and when |
2080 | * updating tg3_flags and tg3_flags2. | 2080 | * updating tg3_flags and tg3_flags2. |
2081 | * | 2081 | * |
2082 | * tx_lock: Held during tg3_start_xmit and tg3_tx only | 2082 | * netif_tx_lock: Held during tg3_start_xmit. tg3_tx holds |
2083 | * when calling netif_[start|stop]_queue. | 2083 | * netif_tx_lock when it needs to call |
2084 | * tg3_start_xmit is protected by netif_tx_lock. | 2084 | * netif_wake_queue. |
2085 | * | 2085 | * |
2086 | * Both of these locks are to be held with BH safety. | 2086 | * Both of these locks are to be held with BH safety. |
2087 | * | 2087 | * |
@@ -2118,8 +2118,6 @@ struct tg3 { | |||
2118 | u32 tx_cons; | 2118 | u32 tx_cons; |
2119 | u32 tx_pending; | 2119 | u32 tx_pending; |
2120 | 2120 | ||
2121 | spinlock_t tx_lock; | ||
2122 | |||
2123 | struct tg3_tx_buffer_desc *tx_ring; | 2121 | struct tg3_tx_buffer_desc *tx_ring; |
2124 | struct tx_ring_info *tx_buffers; | 2122 | struct tx_ring_info *tx_buffers; |
2125 | dma_addr_t tx_desc_mapping; | 2123 | dma_addr_t tx_desc_mapping; |
diff --git a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig index 3fae77ffb2fa..3c148eaf2f4d 100644 --- a/drivers/pci/hotplug/Kconfig +++ b/drivers/pci/hotplug/Kconfig | |||
@@ -153,13 +153,6 @@ config HOTPLUG_PCI_SHPC_POLL_EVENT_MODE | |||
153 | 153 | ||
154 | When in doubt, say N. | 154 | When in doubt, say N. |
155 | 155 | ||
156 | config HOTPLUG_PCI_SHPC_PHPRM_LEGACY | ||
157 | bool "For AMD SHPC only: Use $HRT for resource/configuration" | ||
158 | depends on HOTPLUG_PCI_SHPC && !ACPI | ||
159 | help | ||
160 | Say Y here for AMD SHPC. You have to select this option if you are | ||
161 | using this driver on platform with AMD SHPC. | ||
162 | |||
163 | config HOTPLUG_PCI_RPA | 156 | config HOTPLUG_PCI_RPA |
164 | tristate "RPA PCI Hotplug driver" | 157 | tristate "RPA PCI Hotplug driver" |
165 | depends on HOTPLUG_PCI && PPC_PSERIES && PPC64 && !HOTPLUG_PCI_FAKE | 158 | depends on HOTPLUG_PCI && PPC_PSERIES && PPC64 && !HOTPLUG_PCI_FAKE |
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index ce89f5815861..eaea9d36a1bb 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -279,6 +279,11 @@ struct hpc_ops { | |||
279 | 279 | ||
280 | 280 | ||
281 | #ifdef CONFIG_ACPI | 281 | #ifdef CONFIG_ACPI |
282 | #include <acpi/acpi.h> | ||
283 | #include <acpi/acpi_bus.h> | ||
284 | #include <acpi/actypes.h> | ||
285 | #include <linux/pci-acpi.h> | ||
286 | |||
282 | #define pciehp_get_hp_hw_control_from_firmware(dev) \ | 287 | #define pciehp_get_hp_hw_control_from_firmware(dev) \ |
283 | pciehp_acpi_get_hp_hw_control_from_firmware(dev) | 288 | pciehp_acpi_get_hp_hw_control_from_firmware(dev) |
284 | static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev, | 289 | static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev, |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 0d8fb6e607a1..6ab3b6cd2b54 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -38,10 +38,6 @@ | |||
38 | 38 | ||
39 | #include "../pci.h" | 39 | #include "../pci.h" |
40 | #include "pciehp.h" | 40 | #include "pciehp.h" |
41 | #include <acpi/acpi.h> | ||
42 | #include <acpi/acpi_bus.h> | ||
43 | #include <acpi/actypes.h> | ||
44 | #include <linux/pci-acpi.h> | ||
45 | #ifdef DEBUG | 41 | #ifdef DEBUG |
46 | #define DBG_K_TRACE_ENTRY ((unsigned int)0x00000001) /* On function entry */ | 42 | #define DBG_K_TRACE_ENTRY ((unsigned int)0x00000001) /* On function entry */ |
47 | #define DBG_K_TRACE_EXIT ((unsigned int)0x00000002) /* On function exit */ | 43 | #define DBG_K_TRACE_EXIT ((unsigned int)0x00000002) /* On function exit */ |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 4bf03fb67f8d..d8e9b95f0a1a 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1730,8 +1730,8 @@ dasd_flush_request_queue(struct dasd_device * device) | |||
1730 | req = elv_next_request(device->request_queue); | 1730 | req = elv_next_request(device->request_queue); |
1731 | if (req == NULL) | 1731 | if (req == NULL) |
1732 | break; | 1732 | break; |
1733 | dasd_end_request(req, 0); | ||
1734 | blkdev_dequeue_request(req); | 1733 | blkdev_dequeue_request(req); |
1734 | dasd_end_request(req, 0); | ||
1735 | } | 1735 | } |
1736 | spin_unlock_irq(&device->request_queue_lock); | 1736 | spin_unlock_irq(&device->request_queue_lock); |
1737 | } | 1737 | } |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 7f6fdac74706..9d0c6e1a0e66 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -48,18 +48,20 @@ struct dasd_devmap { | |||
48 | }; | 48 | }; |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * dasd_servermap is used to store the server_id of all storage servers | 51 | * dasd_server_ssid_map contains a globally unique storage server subsystem ID. |
52 | * accessed by DASD device driver. | 52 | * dasd_server_ssid_list contains the list of all subsystem IDs accessed by |
53 | * the DASD device driver. | ||
53 | */ | 54 | */ |
54 | struct dasd_servermap { | 55 | struct dasd_server_ssid_map { |
55 | struct list_head list; | 56 | struct list_head list; |
56 | struct server_id { | 57 | struct server_id { |
57 | char vendor[4]; | 58 | char vendor[4]; |
58 | char serial[15]; | 59 | char serial[15]; |
59 | } sid; | 60 | } sid; |
61 | __u16 ssid; | ||
60 | }; | 62 | }; |
61 | 63 | ||
62 | static struct list_head dasd_serverlist; | 64 | static struct list_head dasd_server_ssid_list; |
63 | 65 | ||
64 | /* | 66 | /* |
65 | * Parameter parsing functions for dasd= parameter. The syntax is: | 67 | * Parameter parsing functions for dasd= parameter. The syntax is: |
@@ -89,7 +91,7 @@ static char *dasd[256]; | |||
89 | module_param_array(dasd, charp, NULL, 0); | 91 | module_param_array(dasd, charp, NULL, 0); |
90 | 92 | ||
91 | /* | 93 | /* |
92 | * Single spinlock to protect devmap structures and lists. | 94 | * Single spinlock to protect devmap and servermap structures and lists. |
93 | */ | 95 | */ |
94 | static DEFINE_SPINLOCK(dasd_devmap_lock); | 96 | static DEFINE_SPINLOCK(dasd_devmap_lock); |
95 | 97 | ||
@@ -264,8 +266,9 @@ dasd_parse_keyword( char *parsestring ) { | |||
264 | if (dasd_page_cache) | 266 | if (dasd_page_cache) |
265 | return residual_str; | 267 | return residual_str; |
266 | dasd_page_cache = | 268 | dasd_page_cache = |
267 | kmem_cache_create("dasd_page_cache", PAGE_SIZE, 0, | 269 | kmem_cache_create("dasd_page_cache", PAGE_SIZE, |
268 | SLAB_CACHE_DMA, NULL, NULL ); | 270 | PAGE_SIZE, SLAB_CACHE_DMA, |
271 | NULL, NULL ); | ||
269 | if (!dasd_page_cache) | 272 | if (!dasd_page_cache) |
270 | MESSAGE(KERN_WARNING, "%s", "Failed to create slab, " | 273 | MESSAGE(KERN_WARNING, "%s", "Failed to create slab, " |
271 | "fixed buffer mode disabled."); | 274 | "fixed buffer mode disabled."); |
@@ -859,39 +862,6 @@ static struct attribute_group dasd_attr_group = { | |||
859 | }; | 862 | }; |
860 | 863 | ||
861 | /* | 864 | /* |
862 | * Check if the related storage server is already contained in the | ||
863 | * dasd_serverlist. If server is not contained, create new entry. | ||
864 | * Return 0 if server was already in serverlist, | ||
865 | * 1 if the server was added successfully | ||
866 | * <0 in case of error. | ||
867 | */ | ||
868 | static int | ||
869 | dasd_add_server(struct dasd_uid *uid) | ||
870 | { | ||
871 | struct dasd_servermap *new, *tmp; | ||
872 | |||
873 | /* check if server is already contained */ | ||
874 | list_for_each_entry(tmp, &dasd_serverlist, list) | ||
875 | // normale cmp? | ||
876 | if (strncmp(tmp->sid.vendor, uid->vendor, | ||
877 | sizeof(tmp->sid.vendor)) == 0 | ||
878 | && strncmp(tmp->sid.serial, uid->serial, | ||
879 | sizeof(tmp->sid.serial)) == 0) | ||
880 | return 0; | ||
881 | |||
882 | new = (struct dasd_servermap *) | ||
883 | kzalloc(sizeof(struct dasd_servermap), GFP_KERNEL); | ||
884 | if (!new) | ||
885 | return -ENOMEM; | ||
886 | |||
887 | strncpy(new->sid.vendor, uid->vendor, sizeof(new->sid.vendor)); | ||
888 | strncpy(new->sid.serial, uid->serial, sizeof(new->sid.serial)); | ||
889 | list_add(&new->list, &dasd_serverlist); | ||
890 | return 1; | ||
891 | } | ||
892 | |||
893 | |||
894 | /* | ||
895 | * Return copy of the device unique identifier. | 865 | * Return copy of the device unique identifier. |
896 | */ | 866 | */ |
897 | int | 867 | int |
@@ -910,6 +880,9 @@ dasd_get_uid(struct ccw_device *cdev, struct dasd_uid *uid) | |||
910 | 880 | ||
911 | /* | 881 | /* |
912 | * Register the given device unique identifier into devmap struct. | 882 | * Register the given device unique identifier into devmap struct. |
883 | * In addition check if the related storage server subsystem ID is already | ||
884 | * contained in the dasd_server_ssid_list. If subsystem ID is not contained, | ||
885 | * create new entry. | ||
913 | * Return 0 if server was already in serverlist, | 886 | * Return 0 if server was already in serverlist, |
914 | * 1 if the server was added successful | 887 | * 1 if the server was added successful |
915 | * <0 in case of error. | 888 | * <0 in case of error. |
@@ -918,16 +891,39 @@ int | |||
918 | dasd_set_uid(struct ccw_device *cdev, struct dasd_uid *uid) | 891 | dasd_set_uid(struct ccw_device *cdev, struct dasd_uid *uid) |
919 | { | 892 | { |
920 | struct dasd_devmap *devmap; | 893 | struct dasd_devmap *devmap; |
921 | int rc; | 894 | struct dasd_server_ssid_map *srv, *tmp; |
922 | 895 | ||
923 | devmap = dasd_find_busid(cdev->dev.bus_id); | 896 | devmap = dasd_find_busid(cdev->dev.bus_id); |
924 | if (IS_ERR(devmap)) | 897 | if (IS_ERR(devmap)) |
925 | return PTR_ERR(devmap); | 898 | return PTR_ERR(devmap); |
899 | |||
900 | /* generate entry for server_ssid_map */ | ||
901 | srv = (struct dasd_server_ssid_map *) | ||
902 | kzalloc(sizeof(struct dasd_server_ssid_map), GFP_KERNEL); | ||
903 | if (!srv) | ||
904 | return -ENOMEM; | ||
905 | strncpy(srv->sid.vendor, uid->vendor, sizeof(srv->sid.vendor) - 1); | ||
906 | strncpy(srv->sid.serial, uid->serial, sizeof(srv->sid.serial) - 1); | ||
907 | srv->ssid = uid->ssid; | ||
908 | |||
909 | /* server is already contained ? */ | ||
926 | spin_lock(&dasd_devmap_lock); | 910 | spin_lock(&dasd_devmap_lock); |
927 | devmap->uid = *uid; | 911 | devmap->uid = *uid; |
928 | rc = dasd_add_server(uid); | 912 | list_for_each_entry(tmp, &dasd_server_ssid_list, list) { |
913 | if (!memcmp(&srv->sid, &tmp->sid, | ||
914 | sizeof(struct dasd_server_ssid_map))) { | ||
915 | kfree(srv); | ||
916 | srv = NULL; | ||
917 | break; | ||
918 | } | ||
919 | } | ||
920 | |||
921 | /* add servermap to serverlist */ | ||
922 | if (srv) | ||
923 | list_add(&srv->list, &dasd_server_ssid_list); | ||
929 | spin_unlock(&dasd_devmap_lock); | 924 | spin_unlock(&dasd_devmap_lock); |
930 | return rc; | 925 | |
926 | return (srv ? 1 : 0); | ||
931 | } | 927 | } |
932 | EXPORT_SYMBOL_GPL(dasd_set_uid); | 928 | EXPORT_SYMBOL_GPL(dasd_set_uid); |
933 | 929 | ||
@@ -995,7 +991,7 @@ dasd_devmap_init(void) | |||
995 | INIT_LIST_HEAD(&dasd_hashlists[i]); | 991 | INIT_LIST_HEAD(&dasd_hashlists[i]); |
996 | 992 | ||
997 | /* Initialize servermap structure. */ | 993 | /* Initialize servermap structure. */ |
998 | INIT_LIST_HEAD(&dasd_serverlist); | 994 | INIT_LIST_HEAD(&dasd_server_ssid_list); |
999 | return 0; | 995 | return 0; |
1000 | } | 996 | } |
1001 | 997 | ||
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 39c2281371b5..957ed5db98e4 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -468,11 +468,11 @@ dasd_eckd_generate_uid(struct dasd_device *device, struct dasd_uid *uid) | |||
468 | return -ENODEV; | 468 | return -ENODEV; |
469 | 469 | ||
470 | memset(uid, 0, sizeof(struct dasd_uid)); | 470 | memset(uid, 0, sizeof(struct dasd_uid)); |
471 | strncpy(uid->vendor, confdata->ned1.HDA_manufacturer, | 471 | memcpy(uid->vendor, confdata->ned1.HDA_manufacturer, |
472 | sizeof(uid->vendor) - 1); | 472 | sizeof(uid->vendor) - 1); |
473 | EBCASC(uid->vendor, sizeof(uid->vendor) - 1); | 473 | EBCASC(uid->vendor, sizeof(uid->vendor) - 1); |
474 | strncpy(uid->serial, confdata->ned1.HDA_location, | 474 | memcpy(uid->serial, confdata->ned1.HDA_location, |
475 | sizeof(uid->serial) - 1); | 475 | sizeof(uid->serial) - 1); |
476 | EBCASC(uid->serial, sizeof(uid->serial) - 1); | 476 | EBCASC(uid->serial, sizeof(uid->serial) - 1); |
477 | uid->ssid = confdata->neq.subsystemID; | 477 | uid->ssid = confdata->neq.subsystemID; |
478 | if (confdata->ned2.sneq.flags == 0x40) { | 478 | if (confdata->ned2.sneq.flags == 0x40) { |
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index 1140302ff11d..ca7d51f7eccc 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c | |||
@@ -48,15 +48,6 @@ | |||
48 | #define PRINT_ERR(x...) printk(KERN_ERR XPRAM_NAME " error:" x) | 48 | #define PRINT_ERR(x...) printk(KERN_ERR XPRAM_NAME " error:" x) |
49 | 49 | ||
50 | 50 | ||
51 | static struct sysdev_class xpram_sysclass = { | ||
52 | set_kset_name("xpram"), | ||
53 | }; | ||
54 | |||
55 | static struct sys_device xpram_sys_device = { | ||
56 | .id = 0, | ||
57 | .cls = &xpram_sysclass, | ||
58 | }; | ||
59 | |||
60 | typedef struct { | 51 | typedef struct { |
61 | unsigned int size; /* size of xpram segment in pages */ | 52 | unsigned int size; /* size of xpram segment in pages */ |
62 | unsigned int offset; /* start page of xpram segment */ | 53 | unsigned int offset; /* start page of xpram segment */ |
@@ -451,8 +442,6 @@ static void __exit xpram_exit(void) | |||
451 | } | 442 | } |
452 | unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); | 443 | unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); |
453 | blk_cleanup_queue(xpram_queue); | 444 | blk_cleanup_queue(xpram_queue); |
454 | sysdev_unregister(&xpram_sys_device); | ||
455 | sysdev_class_unregister(&xpram_sysclass); | ||
456 | } | 445 | } |
457 | 446 | ||
458 | static int __init xpram_init(void) | 447 | static int __init xpram_init(void) |
@@ -470,19 +459,7 @@ static int __init xpram_init(void) | |||
470 | rc = xpram_setup_sizes(xpram_pages); | 459 | rc = xpram_setup_sizes(xpram_pages); |
471 | if (rc) | 460 | if (rc) |
472 | return rc; | 461 | return rc; |
473 | rc = sysdev_class_register(&xpram_sysclass); | 462 | return xpram_setup_blkdev(); |
474 | if (rc) | ||
475 | return rc; | ||
476 | |||
477 | rc = sysdev_register(&xpram_sys_device); | ||
478 | if (rc) { | ||
479 | sysdev_class_unregister(&xpram_sysclass); | ||
480 | return rc; | ||
481 | } | ||
482 | rc = xpram_setup_blkdev(); | ||
483 | if (rc) | ||
484 | sysdev_unregister(&xpram_sys_device); | ||
485 | return rc; | ||
486 | } | 463 | } |
487 | 464 | ||
488 | module_init(xpram_init); | 465 | module_init(xpram_init); |
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index 643b6d078563..56b87618b100 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c | |||
@@ -76,7 +76,7 @@ struct tape_class_device *register_tape_dev( | |||
76 | device, | 76 | device, |
77 | "%s", tcd->device_name | 77 | "%s", tcd->device_name |
78 | ); | 78 | ); |
79 | rc = PTR_ERR(tcd->class_device); | 79 | rc = IS_ERR(tcd->class_device) ? PTR_ERR(tcd->class_device) : 0; |
80 | if (rc) | 80 | if (rc) |
81 | goto fail_with_cdev; | 81 | goto fail_with_cdev; |
82 | rc = sysfs_create_link( | 82 | rc = sysfs_create_link( |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 7a39e0b0386c..6d91c2eb205b 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -772,6 +772,7 @@ ccw_device_online_verify(struct ccw_device *cdev, enum dev_event dev_event) | |||
772 | stsch(sch->schid, &sch->schib); | 772 | stsch(sch->schid, &sch->schib); |
773 | 773 | ||
774 | if (sch->schib.scsw.actl != 0 || | 774 | if (sch->schib.scsw.actl != 0 || |
775 | (sch->schib.scsw.stctl & SCSW_STCTL_STATUS_PEND) || | ||
775 | (cdev->private->irb.scsw.stctl & SCSW_STCTL_STATUS_PEND)) { | 776 | (cdev->private->irb.scsw.stctl & SCSW_STCTL_STATUS_PEND)) { |
776 | /* | 777 | /* |
777 | * No final status yet or final status not yet delivered | 778 | * No final status yet or final status not yet delivered |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index a60124264bee..9e3de0bd59b5 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -263,6 +263,9 @@ ccw_device_wake_up(struct ccw_device *cdev, unsigned long ip, struct irb *irb) | |||
263 | /* Abuse intparm for error reporting. */ | 263 | /* Abuse intparm for error reporting. */ |
264 | if (IS_ERR(irb)) | 264 | if (IS_ERR(irb)) |
265 | cdev->private->intparm = -EIO; | 265 | cdev->private->intparm = -EIO; |
266 | else if (irb->scsw.cc == 1) | ||
267 | /* Retry for deferred condition code. */ | ||
268 | cdev->private->intparm = -EAGAIN; | ||
266 | else if ((irb->scsw.dstat != | 269 | else if ((irb->scsw.dstat != |
267 | (DEV_STAT_CHN_END|DEV_STAT_DEV_END)) || | 270 | (DEV_STAT_CHN_END|DEV_STAT_DEV_END)) || |
268 | (irb->scsw.cstat != 0)) { | 271 | (irb->scsw.cstat != 0)) { |
diff --git a/drivers/scsi/arm/Kconfig b/drivers/scsi/arm/Kconfig index 06d7601cdf56..d006a8cb4a74 100644 --- a/drivers/scsi/arm/Kconfig +++ b/drivers/scsi/arm/Kconfig | |||
@@ -69,6 +69,7 @@ comment "The following drivers are not fully supported" | |||
69 | config SCSI_CUMANA_1 | 69 | config SCSI_CUMANA_1 |
70 | tristate "CumanaSCSI I support (EXPERIMENTAL)" | 70 | tristate "CumanaSCSI I support (EXPERIMENTAL)" |
71 | depends on ARCH_ACORN && EXPERIMENTAL && SCSI | 71 | depends on ARCH_ACORN && EXPERIMENTAL && SCSI |
72 | select SCSI_SPI_ATTRS | ||
72 | help | 73 | help |
73 | This enables support for the Cumana SCSI I card. If you have an | 74 | This enables support for the Cumana SCSI I card. If you have an |
74 | Acorn system with one of these, say Y. If unsure, say N. | 75 | Acorn system with one of these, say Y. If unsure, say N. |
@@ -76,6 +77,7 @@ config SCSI_CUMANA_1 | |||
76 | config SCSI_ECOSCSI | 77 | config SCSI_ECOSCSI |
77 | tristate "EcoScsi support (EXPERIMENTAL)" | 78 | tristate "EcoScsi support (EXPERIMENTAL)" |
78 | depends on ARCH_ACORN && EXPERIMENTAL && (ARCH_ARC || ARCH_A5K) && SCSI | 79 | depends on ARCH_ACORN && EXPERIMENTAL && (ARCH_ARC || ARCH_A5K) && SCSI |
80 | select SCSI_SPI_ATTRS | ||
79 | help | 81 | help |
80 | This enables support for the EcoSCSI card -- a small card that sits | 82 | This enables support for the EcoSCSI card -- a small card that sits |
81 | in the Econet socket. If you have an Acorn system with one of these, | 83 | in the Econet socket. If you have an Acorn system with one of these, |
@@ -84,6 +86,7 @@ config SCSI_ECOSCSI | |||
84 | config SCSI_OAK1 | 86 | config SCSI_OAK1 |
85 | tristate "Oak SCSI support (EXPERIMENTAL)" | 87 | tristate "Oak SCSI support (EXPERIMENTAL)" |
86 | depends on ARCH_ACORN && EXPERIMENTAL && SCSI | 88 | depends on ARCH_ACORN && EXPERIMENTAL && SCSI |
89 | select SCSI_SPI_ATTRS | ||
87 | help | 90 | help |
88 | This enables support for the Oak SCSI card. If you have an Acorn | 91 | This enables support for the Oak SCSI card. If you have an Acorn |
89 | system with one of these, say Y. If unsure, say N. | 92 | system with one of these, say Y. If unsure, say N. |
diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h index 6dd544a5eb56..8c2600ffc6af 100644 --- a/drivers/scsi/arm/scsi.h +++ b/drivers/scsi/arm/scsi.h | |||
@@ -74,7 +74,7 @@ static inline void init_SCp(Scsi_Cmnd *SCpnt) | |||
74 | unsigned long len = 0; | 74 | unsigned long len = 0; |
75 | int buf; | 75 | int buf; |
76 | 76 | ||
77 | SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->buffer; | 77 | SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer; |
78 | SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; | 78 | SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; |
79 | SCpnt->SCp.ptr = (char *) | 79 | SCpnt->SCp.ptr = (char *) |
80 | (page_address(SCpnt->SCp.buffer->page) + | 80 | (page_address(SCpnt->SCp.buffer->page) + |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 19745a31072b..5e8afc876980 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -567,8 +567,8 @@ static int piix_sata_prereset(struct ata_port *ap) | |||
567 | present = 1; | 567 | present = 1; |
568 | } | 568 | } |
569 | 569 | ||
570 | DPRINTK("ata%u: LEAVE, pcs=0x%x present_mask=0x%x\n", | 570 | DPRINTK("ata%u: LEAVE, pcs=0x%x present=0x%x\n", |
571 | ap->id, pcs, present_mask); | 571 | ap->id, pcs, present); |
572 | 572 | ||
573 | if (!present) { | 573 | if (!present) { |
574 | ata_port_printk(ap, KERN_INFO, "SATA port has no device.\n"); | 574 | ata_port_printk(ap, KERN_INFO, "SATA port has no device.\n"); |
@@ -828,6 +828,7 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev, | |||
828 | case IDE: | 828 | case IDE: |
829 | WARN_ON((i & 1) || map[i + 1] != IDE); | 829 | WARN_ON((i & 1) || map[i + 1] != IDE); |
830 | pinfo[i / 2] = piix_port_info[ich5_pata]; | 830 | pinfo[i / 2] = piix_port_info[ich5_pata]; |
831 | pinfo[i / 2].private_data = hpriv; | ||
831 | i++; | 832 | i++; |
832 | printk(" IDE IDE"); | 833 | printk(" IDE IDE"); |
833 | break; | 834 | break; |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 386e5f21e191..16fc2dd8f2f7 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -5185,28 +5185,6 @@ void ata_host_stop (struct ata_host_set *host_set) | |||
5185 | iounmap(host_set->mmio_base); | 5185 | iounmap(host_set->mmio_base); |
5186 | } | 5186 | } |
5187 | 5187 | ||
5188 | |||
5189 | /** | ||
5190 | * ata_host_remove - Unregister SCSI host structure with upper layers | ||
5191 | * @ap: Port to unregister | ||
5192 | * @do_unregister: 1 if we fully unregister, 0 to just stop the port | ||
5193 | * | ||
5194 | * LOCKING: | ||
5195 | * Inherited from caller. | ||
5196 | */ | ||
5197 | |||
5198 | static void ata_host_remove(struct ata_port *ap, unsigned int do_unregister) | ||
5199 | { | ||
5200 | struct Scsi_Host *sh = ap->host; | ||
5201 | |||
5202 | DPRINTK("ENTER\n"); | ||
5203 | |||
5204 | if (do_unregister) | ||
5205 | scsi_remove_host(sh); | ||
5206 | |||
5207 | ap->ops->port_stop(ap); | ||
5208 | } | ||
5209 | |||
5210 | /** | 5188 | /** |
5211 | * ata_dev_init - Initialize an ata_device structure | 5189 | * ata_dev_init - Initialize an ata_device structure |
5212 | * @dev: Device structure to initialize | 5190 | * @dev: Device structure to initialize |
@@ -5532,8 +5510,11 @@ int ata_device_add(const struct ata_probe_ent *ent) | |||
5532 | 5510 | ||
5533 | err_out: | 5511 | err_out: |
5534 | for (i = 0; i < count; i++) { | 5512 | for (i = 0; i < count; i++) { |
5535 | ata_host_remove(host_set->ports[i], 1); | 5513 | struct ata_port *ap = host_set->ports[i]; |
5536 | scsi_host_put(host_set->ports[i]->host); | 5514 | if (ap) { |
5515 | ap->ops->port_stop(ap); | ||
5516 | scsi_host_put(ap->host); | ||
5517 | } | ||
5537 | } | 5518 | } |
5538 | err_free_ret: | 5519 | err_free_ret: |
5539 | kfree(host_set); | 5520 | kfree(host_set); |
@@ -5558,7 +5539,7 @@ void ata_port_detach(struct ata_port *ap) | |||
5558 | int i; | 5539 | int i; |
5559 | 5540 | ||
5560 | if (!ap->ops->error_handler) | 5541 | if (!ap->ops->error_handler) |
5561 | return; | 5542 | goto skip_eh; |
5562 | 5543 | ||
5563 | /* tell EH we're leaving & flush EH */ | 5544 | /* tell EH we're leaving & flush EH */ |
5564 | spin_lock_irqsave(ap->lock, flags); | 5545 | spin_lock_irqsave(ap->lock, flags); |
@@ -5594,6 +5575,7 @@ void ata_port_detach(struct ata_port *ap) | |||
5594 | cancel_delayed_work(&ap->hotplug_task); | 5575 | cancel_delayed_work(&ap->hotplug_task); |
5595 | flush_workqueue(ata_aux_wq); | 5576 | flush_workqueue(ata_aux_wq); |
5596 | 5577 | ||
5578 | skip_eh: | ||
5597 | /* remove the associated SCSI host */ | 5579 | /* remove the associated SCSI host */ |
5598 | scsi_remove_host(ap->host); | 5580 | scsi_remove_host(ap->host); |
5599 | } | 5581 | } |
@@ -5662,7 +5644,7 @@ int ata_scsi_release(struct Scsi_Host *host) | |||
5662 | DPRINTK("ENTER\n"); | 5644 | DPRINTK("ENTER\n"); |
5663 | 5645 | ||
5664 | ap->ops->port_disable(ap); | 5646 | ap->ops->port_disable(ap); |
5665 | ata_host_remove(ap, 0); | 5647 | ap->ops->port_stop(ap); |
5666 | 5648 | ||
5667 | DPRINTK("EXIT\n"); | 5649 | DPRINTK("EXIT\n"); |
5668 | return 1; | 5650 | return 1; |
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 7ced41ecde86..e92c31d698ff 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -2353,6 +2353,19 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc) | |||
2353 | ata_gen_ata_desc_sense(qc); | 2353 | ata_gen_ata_desc_sense(qc); |
2354 | } | 2354 | } |
2355 | 2355 | ||
2356 | /* SCSI EH automatically locks door if sdev->locked is | ||
2357 | * set. Sometimes door lock request continues to | ||
2358 | * fail, for example, when no media is present. This | ||
2359 | * creates a loop - SCSI EH issues door lock which | ||
2360 | * fails and gets invoked again to acquire sense data | ||
2361 | * for the failed command. | ||
2362 | * | ||
2363 | * If door lock fails, always clear sdev->locked to | ||
2364 | * avoid this infinite loop. | ||
2365 | */ | ||
2366 | if (qc->cdb[0] == ALLOW_MEDIUM_REMOVAL) | ||
2367 | qc->dev->sdev->locked = 0; | ||
2368 | |||
2356 | qc->scsicmd->result = SAM_STAT_CHECK_CONDITION; | 2369 | qc->scsicmd->result = SAM_STAT_CHECK_CONDITION; |
2357 | qc->scsidone(cmd); | 2370 | qc->scsidone(cmd); |
2358 | ata_qc_free(qc); | 2371 | ata_qc_free(qc); |
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index 2e0f4a4076af..3f368c7d3ef9 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -1106,7 +1106,6 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1106 | 1106 | ||
1107 | probe_ent->irq = pdev->irq; | 1107 | probe_ent->irq = pdev->irq; |
1108 | probe_ent->irq_flags = IRQF_SHARED; | 1108 | probe_ent->irq_flags = IRQF_SHARED; |
1109 | probe_ent->mmio_base = port_base; | ||
1110 | probe_ent->private_data = hpriv; | 1109 | probe_ent->private_data = hpriv; |
1111 | 1110 | ||
1112 | hpriv->host_base = host_base; | 1111 | hpriv->host_base = host_base; |
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c index 822914e2f43b..f7a975d5db09 100644 --- a/drivers/usb/host/ohci-au1xxx.c +++ b/drivers/usb/host/ohci-au1xxx.c | |||
@@ -110,7 +110,6 @@ static void au1xxx_start_ohc(struct platform_device *dev) | |||
110 | 110 | ||
111 | printk(KERN_DEBUG __FILE__ | 111 | printk(KERN_DEBUG __FILE__ |
112 | ": Clock to USB host has been enabled \n"); | 112 | ": Clock to USB host has been enabled \n"); |
113 | #endif | ||
114 | } | 113 | } |
115 | 114 | ||
116 | static void au1xxx_stop_ohc(struct platform_device *dev) | 115 | static void au1xxx_stop_ohc(struct platform_device *dev) |
diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c index 9e3f13903371..044faa07e297 100644 --- a/drivers/usb/input/appletouch.c +++ b/drivers/usb/input/appletouch.c | |||
@@ -597,9 +597,9 @@ static void atp_disconnect(struct usb_interface *iface) | |||
597 | if (dev) { | 597 | if (dev) { |
598 | usb_kill_urb(dev->urb); | 598 | usb_kill_urb(dev->urb); |
599 | input_unregister_device(dev->input); | 599 | input_unregister_device(dev->input); |
600 | usb_free_urb(dev->urb); | ||
601 | usb_buffer_free(dev->udev, dev->datalen, | 600 | usb_buffer_free(dev->udev, dev->datalen, |
602 | dev->data, dev->urb->transfer_dma); | 601 | dev->data, dev->urb->transfer_dma); |
602 | usb_free_urb(dev->urb); | ||
603 | kfree(dev); | 603 | kfree(dev); |
604 | } | 604 | } |
605 | printk(KERN_INFO "input: appletouch disconnected\n"); | 605 | printk(KERN_INFO "input: appletouch disconnected\n"); |
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 786e1dbe88ec..983e104dd452 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -1242,11 +1242,12 @@ done: | |||
1242 | static int ctrl_out (struct usbtest_dev *dev, | 1242 | static int ctrl_out (struct usbtest_dev *dev, |
1243 | unsigned count, unsigned length, unsigned vary) | 1243 | unsigned count, unsigned length, unsigned vary) |
1244 | { | 1244 | { |
1245 | unsigned i, j, len, retval; | 1245 | unsigned i, j, len; |
1246 | int retval; | ||
1246 | u8 *buf; | 1247 | u8 *buf; |
1247 | char *what = "?"; | 1248 | char *what = "?"; |
1248 | struct usb_device *udev; | 1249 | struct usb_device *udev; |
1249 | 1250 | ||
1250 | if (length < 1 || length > 0xffff || vary >= length) | 1251 | if (length < 1 || length > 0xffff || vary >= length) |
1251 | return -EINVAL; | 1252 | return -EINVAL; |
1252 | 1253 | ||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index a20da8528a5f..15945e806f03 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -306,6 +306,8 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = { | |||
306 | 306 | ||
307 | 307 | ||
308 | static struct usb_device_id id_table_combined [] = { | 308 | static struct usb_device_id id_table_combined [] = { |
309 | { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, | ||
310 | { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, | ||
309 | { USB_DEVICE(FTDI_VID, FTDI_ACTZWAVE_PID) }, | 311 | { USB_DEVICE(FTDI_VID, FTDI_ACTZWAVE_PID) }, |
310 | { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) }, | 312 | { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) }, |
311 | { USB_DEVICE(FTDI_VID, FTDI_IPLUS_PID) }, | 313 | { USB_DEVICE(FTDI_VID, FTDI_IPLUS_PID) }, |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 9f7343a45424..8888cd80a491 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -32,6 +32,12 @@ | |||
32 | #define FTDI_NF_RIC_PID 0x0001 /* Product Id */ | 32 | #define FTDI_NF_RIC_PID 0x0001 /* Product Id */ |
33 | 33 | ||
34 | 34 | ||
35 | /* www.canusb.com Lawicel CANUSB device */ | ||
36 | #define FTDI_CANUSB_PID 0xFFA8 /* Product Id */ | ||
37 | |||
38 | /* AlphaMicro Components AMC-232USB01 device */ | ||
39 | #define FTDI_AMC232_PID 0xFF00 /* Product Id */ | ||
40 | |||
35 | /* ACT Solutions HomePro ZWave interface (http://www.act-solutions.com/HomePro.htm) */ | 41 | /* ACT Solutions HomePro ZWave interface (http://www.act-solutions.com/HomePro.htm) */ |
36 | #define FTDI_ACTZWAVE_PID 0xF2D0 | 42 | #define FTDI_ACTZWAVE_PID 0xF2D0 |
37 | 43 | ||
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 7e1bd5d6dfa0..9840bade79f9 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -251,6 +251,8 @@ static struct usb_device_id ipaq_id_table [] = { | |||
251 | { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */ | 251 | { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */ |
252 | { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */ | 252 | { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */ |
253 | { USB_DEVICE(0x04DD, 0x9102) }, /* SHARP WS003SH USB Modem */ | 253 | { USB_DEVICE(0x04DD, 0x9102) }, /* SHARP WS003SH USB Modem */ |
254 | { USB_DEVICE(0x04DD, 0x9121) }, /* SHARP WS004SH USB Modem */ | ||
255 | { USB_DEVICE(0x04DD, 0x9123) }, /* SHARP WS007SH USB Modem */ | ||
254 | { USB_DEVICE(0x04E8, 0x5F00) }, /* Samsung NEXiO USB Sync */ | 256 | { USB_DEVICE(0x04E8, 0x5F00) }, /* Samsung NEXiO USB Sync */ |
255 | { USB_DEVICE(0x04E8, 0x5F01) }, /* Samsung NEXiO USB Sync */ | 257 | { USB_DEVICE(0x04E8, 0x5F01) }, /* Samsung NEXiO USB Sync */ |
256 | { USB_DEVICE(0x04E8, 0x5F02) }, /* Samsung NEXiO USB Sync */ | 258 | { USB_DEVICE(0x04E8, 0x5F02) }, /* Samsung NEXiO USB Sync */ |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 2793f9a912b4..fd158e063c06 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -1240,6 +1240,16 @@ UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103, | |||
1240 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1240 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1241 | US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), | 1241 | US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), |
1242 | 1242 | ||
1243 | /* David Kuehling <dvdkhlng@gmx.de>: | ||
1244 | * for MP3-Player AVOX WSX-300ER (bought in Japan). Reports lots of SCSI | ||
1245 | * errors when trying to write. | ||
1246 | */ | ||
1247 | UNUSUAL_DEV( 0x0f19, 0x0105, 0x0100, 0x0100, | ||
1248 | "C-MEX", | ||
1249 | "A-VOX", | ||
1250 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
1251 | US_FL_IGNORE_RESIDUE ), | ||
1252 | |||
1243 | /* Reported by Michael Stattmann <michael@stattmann.com> */ | 1253 | /* Reported by Michael Stattmann <michael@stattmann.com> */ |
1244 | UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, | 1254 | UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, |
1245 | "Sony Ericsson", | 1255 | "Sony Ericsson", |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index c40b9b8b1e7e..702eb933cf88 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -554,7 +554,7 @@ config FB_VESA | |||
554 | 554 | ||
555 | config FB_IMAC | 555 | config FB_IMAC |
556 | bool "Intel-based Macintosh Framebuffer Support" | 556 | bool "Intel-based Macintosh Framebuffer Support" |
557 | depends on (FB = y) && X86 | 557 | depends on (FB = y) && X86 && EFI |
558 | select FB_CFB_FILLRECT | 558 | select FB_CFB_FILLRECT |
559 | select FB_CFB_COPYAREA | 559 | select FB_CFB_COPYAREA |
560 | select FB_CFB_IMAGEBLIT | 560 | select FB_CFB_IMAGEBLIT |
diff --git a/drivers/video/imacfb.c b/drivers/video/imacfb.c index ff233b84dec4..b485bece5fc9 100644 --- a/drivers/video/imacfb.c +++ b/drivers/video/imacfb.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/screen_info.h> | 18 | #include <linux/screen_info.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/dmi.h> | ||
22 | #include <linux/efi.h> | ||
21 | 23 | ||
22 | #include <asm/io.h> | 24 | #include <asm/io.h> |
23 | 25 | ||
@@ -28,7 +30,7 @@ typedef enum _MAC_TYPE { | |||
28 | M_I20, | 30 | M_I20, |
29 | M_MINI, | 31 | M_MINI, |
30 | M_MACBOOK, | 32 | M_MACBOOK, |
31 | M_NEW | 33 | M_UNKNOWN |
32 | } MAC_TYPE; | 34 | } MAC_TYPE; |
33 | 35 | ||
34 | /* --------------------------------------------------------------------- */ | 36 | /* --------------------------------------------------------------------- */ |
@@ -52,10 +54,36 @@ static struct fb_fix_screeninfo imacfb_fix __initdata = { | |||
52 | }; | 54 | }; |
53 | 55 | ||
54 | static int inverse; | 56 | static int inverse; |
55 | static int model = M_NEW; | 57 | static int model = M_UNKNOWN; |
56 | static int manual_height; | 58 | static int manual_height; |
57 | static int manual_width; | 59 | static int manual_width; |
58 | 60 | ||
61 | static int set_system(struct dmi_system_id *id) | ||
62 | { | ||
63 | printk(KERN_INFO "imacfb: %s detected - set system to %ld\n", | ||
64 | id->ident, (long)id->driver_data); | ||
65 | |||
66 | model = (long)id->driver_data; | ||
67 | |||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | static struct dmi_system_id __initdata dmi_system_table[] = { | ||
72 | { set_system, "iMac4,1", { | ||
73 | DMI_MATCH(DMI_BIOS_VENDOR,"Apple Computer, Inc."), | ||
74 | DMI_MATCH(DMI_BIOS_VERSION,"iMac4,1") }, (void*)M_I17}, | ||
75 | { set_system, "MacBookPro1,1", { | ||
76 | DMI_MATCH(DMI_BIOS_VENDOR,"Apple Computer, Inc."), | ||
77 | DMI_MATCH(DMI_BIOS_VERSION,"MacBookPro1,1") }, (void*)M_I17}, | ||
78 | { set_system, "MacBook1,1", { | ||
79 | DMI_MATCH(DMI_BIOS_VENDOR,"Apple Computer, Inc."), | ||
80 | DMI_MATCH(DMI_PRODUCT_NAME,"MacBook1,1")}, (void *)M_MACBOOK}, | ||
81 | { set_system, "Macmini1,1", { | ||
82 | DMI_MATCH(DMI_BIOS_VENDOR,"Apple Computer, Inc."), | ||
83 | DMI_MATCH(DMI_PRODUCT_NAME,"Macmini1,1")}, (void *)M_MINI}, | ||
84 | {}, | ||
85 | }; | ||
86 | |||
59 | #define DEFAULT_FB_MEM 1024*1024*16 | 87 | #define DEFAULT_FB_MEM 1024*1024*16 |
60 | 88 | ||
61 | /* --------------------------------------------------------------------- */ | 89 | /* --------------------------------------------------------------------- */ |
@@ -149,7 +177,6 @@ static int __init imacfb_probe(struct platform_device *dev) | |||
149 | screen_info.lfb_linelength = 1472 * 4; | 177 | screen_info.lfb_linelength = 1472 * 4; |
150 | screen_info.lfb_base = 0x80010000; | 178 | screen_info.lfb_base = 0x80010000; |
151 | break; | 179 | break; |
152 | case M_NEW: | ||
153 | case M_I20: | 180 | case M_I20: |
154 | screen_info.lfb_width = 1680; | 181 | screen_info.lfb_width = 1680; |
155 | screen_info.lfb_height = 1050; | 182 | screen_info.lfb_height = 1050; |
@@ -207,6 +234,10 @@ static int __init imacfb_probe(struct platform_device *dev) | |||
207 | size_remap = size_total; | 234 | size_remap = size_total; |
208 | imacfb_fix.smem_len = size_remap; | 235 | imacfb_fix.smem_len = size_remap; |
209 | 236 | ||
237 | #ifndef __i386__ | ||
238 | screen_info.imacpm_seg = 0; | ||
239 | #endif | ||
240 | |||
210 | if (!request_mem_region(imacfb_fix.smem_start, size_total, "imacfb")) { | 241 | if (!request_mem_region(imacfb_fix.smem_start, size_total, "imacfb")) { |
211 | printk(KERN_WARNING | 242 | printk(KERN_WARNING |
212 | "imacfb: cannot reserve video memory at 0x%lx\n", | 243 | "imacfb: cannot reserve video memory at 0x%lx\n", |
@@ -324,8 +355,16 @@ static int __init imacfb_init(void) | |||
324 | int ret; | 355 | int ret; |
325 | char *option = NULL; | 356 | char *option = NULL; |
326 | 357 | ||
327 | /* ignore error return of fb_get_options */ | 358 | if (!efi_enabled) |
328 | fb_get_options("imacfb", &option); | 359 | return -ENODEV; |
360 | if (!dmi_check_system(dmi_system_table)) | ||
361 | return -ENODEV; | ||
362 | if (model == M_UNKNOWN) | ||
363 | return -ENODEV; | ||
364 | |||
365 | if (fb_get_options("imacfb", &option)) | ||
366 | return -ENODEV; | ||
367 | |||
329 | imacfb_setup(option); | 368 | imacfb_setup(option); |
330 | ret = platform_driver_register(&imacfb_driver); | 369 | ret = platform_driver_register(&imacfb_driver); |
331 | 370 | ||