rsxx_cfg.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Filename: rsXX_cfg.h
  3. *
  4. *
  5. * Authors: Joshua Morris <josh.h.morris@us.ibm.com>
  6. * Philip Kelleher <pjk1939@linux.vnet.ibm.com>
  7. *
  8. * (C) Copyright 2013 IBM Corporation
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software Foundation,
  22. * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. */
  24. #ifndef __RSXX_CFG_H__
  25. #define __RSXX_CFG_H__
  26. /* NOTE: Config values will be saved in network byte order (i.e. Big endian) */
  27. #include <linux/types.h>
  28. /*
  29. * The card config version must match the driver's expected version. If it does
  30. * not, the DMA interfaces will not be attached and the user will need to
  31. * initialize/upgrade the card configuration using the card config utility.
  32. */
  33. #define RSXX_CFG_VERSION 4
  34. struct card_cfg_hdr {
  35. __u32 version;
  36. __u32 crc;
  37. };
  38. struct card_cfg_data {
  39. __u32 block_size;
  40. __u32 stripe_size;
  41. __u32 vendor_id;
  42. __u32 cache_order;
  43. struct {
  44. __u32 mode; /* Disabled, manual, auto-tune... */
  45. __u32 count; /* Number of intr to coalesce */
  46. __u32 latency;/* Max wait time (in ns) */
  47. } intr_coal;
  48. };
  49. struct rsxx_card_cfg {
  50. struct card_cfg_hdr hdr;
  51. struct card_cfg_data data;
  52. };
  53. /* Vendor ID Values */
  54. #define RSXX_VENDOR_ID_TMS_IBM 0
  55. #define RSXX_VENDOR_ID_DSI 1
  56. #define RSXX_VENDOR_COUNT 2
  57. /* Interrupt Coalescing Values */
  58. #define RSXX_INTR_COAL_DISABLED 0
  59. #define RSXX_INTR_COAL_EXPLICIT 1
  60. #define RSXX_INTR_COAL_AUTO_TUNE 2
  61. #endif /* __RSXX_CFG_H__ */