Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/5/13  <frank.blaschka@xxxxxxxxxx>:
> From: Frank Blaschka <frank.blaschka@xxxxxxxxxx>
>
> Set rx csum default to hw checksumming again.
> Remove sysfs interface for rx csum (checksumming) and TSO (large_send).
> With the new hw_features it does not work to keep the old sysfs
> interface in parallel. Convert options.checksum_type to new hw_features.
[...]
> @@ -1482,32 +1478,34 @@ static int qeth_l3_start_ipa_checksum(st
>
> Â Â Â ÂQETH_CARD_TEXT(card, 3, "strtcsum");
>
> - Â Â Â if (card->options.checksum_type == NO_CHECKSUMMING) {
> - Â Â Â Â Â Â Â dev_info(&card->gdev->dev,
> - Â Â Â Â Â Â Â Â Â Â Â "Using no checksumming on %s.\n",
> - Â Â Â Â Â Â Â Â Â Â Â QETH_CARD_IFNAME(card));
> - Â Â Â Â Â Â Â return 0;
> - Â Â Â }
> - Â Â Â if (card->options.checksum_type == SW_CHECKSUMMING) {
> - Â Â Â Â Â Â Â dev_info(&card->gdev->dev,
> - Â Â Â Â Â Â Â Â Â Â Â "Using SW checksumming on %s.\n",
> - Â Â Â Â Â Â Â Â Â Â Â QETH_CARD_IFNAME(card));
> - Â Â Â Â Â Â Â return 0;
> - Â Â Â }
> - Â Â Â if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
> - Â Â Â Â Â Â Â dev_info(&card->gdev->dev,
> + Â Â Â if (card->dev->features & NETIF_F_RXCSUM) {
> + Â Â Â Â Â Â Â /* hw may have changed during offline or recovery */
> + Â Â Â Â Â Â Â if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
> + Â Â Â Â Â Â Â Â Â Â Â dev_info(&card->gdev->dev,
> Â Â Â Â Â Â Â Â Â Â Â Â"Inbound HW Checksumming not "
> Â Â Â Â Â Â Â Â Â Â Â Â"supported on %s,\ncontinuing "
> Â Â Â Â Â Â Â Â Â Â Â Â"using Inbound SW Checksumming\n",
> Â Â Â Â Â Â Â Â Â Â Â ÂQETH_CARD_IFNAME(card));
> - Â Â Â Â Â Â Â card->options.checksum_type = SW_CHECKSUMMING;
> - Â Â Â Â Â Â Â return 0;
> - Â Â Â }
> - Â Â Â rc = qeth_l3_send_checksum_command(card);
> - Â Â Â if (!rc)
> - Â Â Â Â Â Â Â dev_info(&card->gdev->dev,
> + Â Â Â Â Â Â Â Â Â Â Â goto update_feature;
> + Â Â Â Â Â Â Â }
> +
> + Â Â Â Â Â Â Â rc = qeth_l3_send_checksum_command(card);
> + Â Â Â Â Â Â Â if (!rc)
> + Â Â Â Â Â Â Â Â Â Â Â dev_info(&card->gdev->dev,
> Â Â Â Â Â Â Â Â Â Â Â Â"HW Checksumming (inbound) enabled\n");
> + Â Â Â Â Â Â Â else
> + Â Â Â Â Â Â Â Â Â Â Â goto update_feature;
> + Â Â Â } else
> + Â Â Â Â Â Â Â dev_info(&card->gdev->dev,
> + Â Â Â Â Â Â Â Â Â Â Â "Using SW checksumming on %s.\n",
> + Â Â Â Â Â Â Â Â Â Â Â QETH_CARD_IFNAME(card));
> + Â Â Â return 0;
>
> +update_feature:
> + Â Â Â rtnl_lock();
> + Â Â Â card->dev->features &= ~NETIF_F_RXCSUM;
> + Â Â Â netdev_update_features(card->dev);
> + Â Â Â rtnl_unlock();
> Â Â Â Âreturn rc;
> Â}

This will retry starting the RX checksumming via set_features(). Is
that the intention? If not, then just use something like my example in
qeth_l3_start_ipa_checksum().

Best Regards,
MichaÅ MirosÅaw
ÿô.nlj·Ÿ®‰­†+%ŠË±é¥Šwÿº{.nlj·¥Š{±þÍÓ§¶›¡Ü}©ž²ÆzÚj:+v‰¨þø®w¥þŠàÞ¨è&¢)ß«a¶Úÿûz¹ÞúŽŠÝjÿŠwèf



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux